—
cmd = 'start COLOR 1f ' + '^&' + 'mode con: cols=200 lines=50 ' + '^&' + 'ssh ' + username.get() + '' + ip_num.get()
prog = subprocess.Popen(cmd, stdin = subprocess.PIPE, stdout = subprocess.PIPE,stderr = subprocess.PIPE,shell=True)
prog.stdin.flush()
prog.stdout.flush()
prog.communicate(input='ping 8.8.8.8')