Fixed example testing on windows

This commit is contained in:
Luke Campagnola 2013-02-25 14:03:33 -05:00
parent 4cf9ef70ba
commit a59f4c206a

View File

@ -235,9 +235,13 @@ except:
""" % (import1, graphicsSystem, import2) """ % (import1, graphicsSystem, import2)
process = subprocess.Popen(['exec %s -i' % (exe)], shell=True, stdin=subprocess.PIPE, stderr=subprocess.PIPE, stdout=subprocess.PIPE) if sys.platform.startswith('win'):
process.stdin.write(code.encode('UTF-8')) process = subprocess.Popen([exe], stdin=subprocess.PIPE, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
#process.stdin.close() process.stdin.write(code.encode('UTF-8'))
process.stdin.close()
else:
process = subprocess.Popen(['exec %s -i' % (exe)], shell=True, stdin=subprocess.PIPE, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
process.stdin.write(code.encode('UTF-8'))
output = '' output = ''
fail = False fail = False
while True: while True: