[IronPython] popen should not open new windows.
Jeff Brown
Jeff at ingenio.com
Tue Feb 20 22:03:47 CET 2007
Excellent, thank you. =)
Jeff.
-----Original Message-----
From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland
Sent: Monday, February 19, 2007 3:43 PM
To: Discussion of IronPython
Subject: Re: [IronPython] popen should not open new windows.
Thanks for the bug report! I've opened CodePlex bug #8361 to track &
fix the issue
(http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=8361).
-----Original Message-----
From: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] On Behalf Of Jeff Brown
Sent: Sunday, February 18, 2007 11:45 PM
To: users at lists.ironpython.com
Subject: [IronPython] popen should not open new windows.
When calling a process using nt.popen*, the ProcessInfo has the
CreateNoWindow option set to false. This is fine ordinarily when
working from the command prompt since it seems the current window will
get recycled. However, when executing within the context of an NT
Service or GUI process what happens is that a new window pops up
whenever popen launches a process. This is very distracting.
I ended up cooking up this workaround:
# The built-in popen causes windows to pop up whenever a process # runs
since it doesn't set the CreateNoWindow option of the ProcessInfo.
*sigh* def QuietPOpen(executable, arguments):
processStartInfo = ProcessStartInfo(executable, arguments)
processStartInfo.UseShellExecute = False
processStartInfo.CreateNoWindow = True
processStartInfo.RedirectStandardOutput = True
process = Process.Start(processStartInfo)
return file(process.StandardOutput.BaseStream, "r")
Jeff.
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
users mailing list
users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
More information about the Ironpython-users
mailing list