Commit 94fe1b9 1 parent 17367e6 commit 94fe1b9 Copy full SHA for 94fe1b9
File tree 1 file changed +19
-2
lines changed
1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -2350,8 +2350,25 @@ class Win32CreateProcessFlagsTests(unittest.TestCase):
2350
2350
def test_flags (self ):
2351
2351
"""
2352
2352
Verify that the flags passed to win32process.CreateProcess() prevent a
2353
- new console window from being created. See http://tm.tl/5726
2354
- for a script to test this interactively.
2353
+ new console window from being created. Use the following script
2354
+ to test this interactively::
2355
+
2356
+ # Add the following lines to a script named
2357
+ # should_not_open_console.pyw
2358
+ from twisted.internet import reactor, utils
2359
+
2360
+ def write_result(result):
2361
+ open("output.log", "w").write(repr(result))
2362
+ reactor.stop()
2363
+
2364
+ PING_EXE = r"c:\windows\system32\ping.exe"
2365
+ d = utils.getProcessOutput(PING_EXE, ["slashdot.org"])
2366
+ d.addCallbacks(write_result)
2367
+ reactor.run()
2368
+
2369
+ To test this, run::
2370
+
2371
+ pythonw.exe should_not_open_console.pyw
2355
2372
"""
2356
2373
from twisted .internet import _dumbwin32proc
2357
2374
flags = []
You can’t perform that action at this time.
0 commit comments