Lines Matching full:sys

4 import sys
36 mswindows = (sys.platform == "win32")
43 SETBINARY = ('import msvcrt; msvcrt.setmode(sys.stdout.fileno(), '
87 rc = subprocess.call([sys.executable, "-c",
88 "import sys; sys.exit(47)"])
93 rc = subprocess.check_call([sys.executable, "-c",
94 "import sys; sys.exit(0)"])
100 subprocess.check_call([sys.executable, "-c",
101 "import sys; sys.exit(47)"])
107 [sys.executable, "-c", "print 'BDFL'"])
114 [sys.executable, "-c", "import sys; sys.exit(5)"])
120 [sys.executable, "-c", "import sys; sys.stderr.write('BDFL')"],
128 [sys.executable, "-c", "print 'will not be run'"],
129 stdout=sys.stdout)
137 rc = subprocess.call([sys.executable, "-c",
138 'import sys, os;'
139 'sys.exit(os.getenv("FRUIT")=="banana")'],
155 p = subprocess.Popen([sys.executable, "-c", 'print "banana"'],
173 code = ('import sys; from subprocess import Popen, PIPE;'
174 'p = Popen([sys.executable, "-c", "print \'test_stdout_none\'"],'
177 p = subprocess.Popen([sys.executable, "-c", code],
187 p = subprocess.Popen([sys.executable, "-c", 'print "banana"'],
195 python_dir = os.path.dirname(os.path.realpath(sys.executable))
197 "import sys; sys.exit(47)"],
198 executable=sys.executable, cwd=python_dir)
208 "import sys; sys.exit(47)"],
209 executable=sys.executable)
215 p = subprocess.Popen([sys.executable, "-c",
216 'import sys; sys.exit(sys.stdin.read() == "pear")'],
229 p = subprocess.Popen([sys.executable, "-c",
230 'import sys; sys.exit(sys.stdin.read() == "pear")'],
240 p = subprocess.Popen([sys.executable, "-c",
241 'import sys; sys.exit(sys.stdin.read() == "pear")'],
248 p = subprocess.Popen([sys.executable, "-c",
249 'import sys; sys.stdout.write("orange")'],
258 p = subprocess.Popen([sys.executable, "-c",
259 'import sys; sys.stdout.write("orange")'],
268 p = subprocess.Popen([sys.executable, "-c",
269 'import sys; sys.stdout.write("orange")'],
277 p = subprocess.Popen([sys.executable, "-c",
278 'import sys; sys.stderr.write("strawberry")'],
287 p = subprocess.Popen([sys.executable, "-c",
288 'import sys; sys.stderr.write("strawberry")'],
297 p = subprocess.Popen([sys.executable, "-c",
298 'import sys; sys.stderr.write("strawberry")'],
310 p = subprocess.Popen([sys.executable, "-c",
311 'import sys, subprocess;'
312 'rc = subprocess.call([sys.executable, "-c",'
313 ' "import sys;"'
314 ' "sys.stderr.write(\'42\')"],'
316 'sys.exit(rc)'],
327 p = subprocess.Popen([sys.executable, "-c",
328 'import sys;'
329 'sys.stdout.write("apple");'
330 'sys.stdout.flush();'
331 'sys.stderr.write("orange")'],
340 p = subprocess.Popen([sys.executable, "-c",
341 'import sys;'
342 'sys.stdout.write("apple");'
343 'sys.stdout.flush();'
344 'sys.stderr.write("orange")'],
357 code = ('import sys, subprocess; '
358 'rc = subprocess.call([sys.executable, "-c", '
359 ' "import os, sys; sys.exit(os.write(sys.stdout.fileno(), '
362 p = subprocess.Popen([sys.executable, "-c", code],
378 p = subprocess.Popen([sys.executable, "-c",
379 'import sys,os;'
380 'sys.stdout.write(os.getcwd())'],
390 p = subprocess.Popen([sys.executable, "-c",
391 'import sys,os;'
392 'sys.stdout.write(os.getenv("FRUIT"))'],
400 cmd = sys.executable + '\0'
406 subprocess.Popen([sys.executable, "-c", "pass#\0"])
413 subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
419 subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
425 subprocess.Popen([sys.executable, "-c", "pass"], env=newenv)
430 p = subprocess.Popen([sys.executable, "-c",
431 'import sys, os;'
432 'sys.stdout.write(os.getenv("FRUIT"))'],
439 p = subprocess.Popen([sys.executable, "-c",
440 'import sys;'
441 'sys.exit(sys.stdin.read() == "pear")'],
447 p = subprocess.Popen([sys.executable, "-c",
448 'import sys; sys.stdout.write("pineapple")'],
455 p = subprocess.Popen([sys.executable, "-c",
456 'import sys; sys.stderr.write("pineapple")'],
463 p = subprocess.Popen([sys.executable, "-c",
464 'import sys,os;'
465 'sys.stderr.write("pineapple");'
466 'sys.stdout.write(sys.stdin.read())'],
485 p = subprocess.Popen([sys.executable, "-c", "print('')"],
496 p = subprocess.Popen([sys.executable, "-c",
497 "import sys; sys.exit(47)"])
513 p = subprocess.Popen([sys.executable, "-c",
514 'import sys,os;'
515 'sys.stdout.write(sys.stdin.read(47));'
516 'sys.stderr.write("xyz"*%d);'
517 'sys.stdout.write(sys.stdin.read())' % pipe_buf],
530 p = subprocess.Popen([sys.executable, "-c",
531 'import sys,os;'
532 'sys.stdout.write(sys.stdin.read())'],
545 p = subprocess.Popen([sys.executable, "-c",
546 'import sys,os;' + SETBINARY +
547 'sys.stdout.write("line1\\n");'
548 'sys.stdout.flush();'
549 'sys.stdout.write("line2\\r");'
550 'sys.stdout.flush();'
551 'sys.stdout.write("line3\\r\\n");'
552 'sys.stdout.flush();'
553 'sys.stdout.write("line4\\r");'
554 'sys.stdout.flush();'
555 'sys.stdout.write("\\nline5");'
556 'sys.stdout.flush();'
557 'sys.stdout.write("\\nline6");'],
573 p = subprocess.Popen([sys.executable, "-c",
574 'import sys,os;' + SETBINARY +
575 'sys.stdout.write("line1\\n");'
576 'sys.stdout.flush();'
577 'sys.stdout.write("line2\\r");'
578 'sys.stdout.flush();'
579 'sys.stdout.write("line3\\r\\n");'
580 'sys.stdout.flush();'
581 'sys.stdout.write("line4\\r");'
582 'sys.stdout.flush();'
583 'sys.stdout.write("\\nline5");'
584 'sys.stdout.flush();'
585 'sys.stdout.write("\\nline6");'],
625 p = subprocess.Popen([sys.executable, "-c",
626 "import sys;"
627 "sys.stdout.write(sys.stdin.read())"],
658 p = subprocess.Popen([sys.executable,
674 p = subprocess.Popen([sys.executable,
685 subprocess.Popen([sys.executable, "-c", "pass"], "orange")
755 p = subprocess.Popen([sys.executable, "-c", 'pass'],
766 p = subprocess.Popen([sys.executable, "-c", 'pass'],
782 [sys.executable, '-c', 'pass'], stdin=subprocess.PIPE,
807 if sys.platform == 'darwin':
819 sys.stdout.flush()
841 args = [sys.executable, "-c", 'import time; time.sleep(2)']
859 p = subprocess.Popen([sys.executable, "-c", ""],
867 p = subprocess.Popen([sys.executable, "-c",
874 p = subprocess.Popen([sys.executable, "-c",
875 "import sys, os;"
876 "sys.stdout.write(os.getenv('FRUIT'))"],
925 self, [sys.executable, "-c", "pass"],
933 os.write(f, "exec '%s' -c 'import sys; sys.exit(47)'\n" %
934 sys.executable)
945 [sys.executable, "-c",
946 "import sys; sys.exit(47)"],
949 [sys.executable, "-c",
950 "import sys; sys.exit(47)"],
977 os.write(f, "exec '%s' -c 'import sys; sys.exit(47)'\n" %
978 sys.executable)
1008 p = subprocess.Popen([sys.executable, "-c", """if 1:
1009 import sys, time
1010 sys.stdout.write('x\\n')
1011 sys.stdout.flush()
1024 @unittest.skipIf(sys.platform.startswith(('netbsd', 'openbsd')),
1029 p = subprocess.Popen([sys.executable, "-c", """if 1:
1030 import sys, time
1031 sys.stdout.write('x\\n')
1032 sys.stdout.flush()
1090 out, err = subprocess.Popen([sys.executable, "-c",
1091 'import sys;'
1092 'sys.stdout.write("apple");'
1093 'sys.stdout.flush();'
1094 'sys.stderr.write("orange")'],
1151 p = subprocess.Popen([sys.executable, "-c",
1152 'import sys; got = sys.stdin.read();'
1153 'sys.stdout.write("got %s"%got); sys.stderr.write("err")'],
1191 p = subprocess.Popen([sys.executable, sigchild_ignore],
1202 p = subprocess.Popen([sys.executable, "-c",
1203 'import sys, time;'
1221 p = subprocess.Popen([sys.executable, "-c",
1250 p1 = subprocess.Popen([sys.executable, "-c",
1257 p2 = subprocess.Popen([sys.executable, "-c", """if True:
1258 import os, errno, sys
1266 sys.exit(1)
1267 sys.exit(0)
1283 args = [sys.executable, '-c', 'pass']
1317 subprocess.call([sys.executable, "-c", "import sys; sys.exit(0)"],
1323 sys.stderr.write(" a DOS box should flash briefly ...\n")
1324 subprocess.call(sys.executable +
1331 [sys.executable, "-c",
1332 "import sys; sys.exit(47)"],
1335 [sys.executable, "-c",
1336 "import sys; sys.exit(47)"],
1342 rc = subprocess.call([sys.executable, "-c",
1343 "import sys; sys.exit(47)"],
1369 rc = subprocess.call(sys.executable +
1370 ' -c "import sys; sys.exit(47)"')
1375 p = subprocess.Popen([sys.executable, "-c", """if 1:
1376 import sys, time
1377 sys.stdout.write('x\\n')
1378 sys.stdout.flush()
1397 p = subprocess.Popen([sys.executable, "-c", """if 1:
1398 import sys, time
1399 sys.stdout.write('x\\n')
1400 sys.stdout.flush()
1401 sys.exit(42)
1477 os.write(f, b"import sys;"
1478 b"sys.stdout.write('%d %s' % (len(sys.argv), [a.lower () for a in sys.argv]))"
1497 self.with_spaces('"%s" "%s" "%s"' % (sys.executable, self.fname,
1502 self.with_spaces([sys.executable, self.fname, "ab cd"], shell=1)
1506 self.with_spaces('"%s" "%s" "%s"' % (sys.executable, self.fname,
1511 self.with_spaces([sys.executable, self.fname, "ab cd"])