All,
I'm stuck with a Pyinstaller problem (Windows 7, latest pyinstaller from git, Python 2.7). I'd like to create an application without a console window, so I pass --noconsole to pyinstaller. However, I also call some external programs from my application, which is causing problems:
- If I use subprocess.call and friends, I get the exception OSError exception "[Error 6] the handle is invalid." This is because a noconsole app has no stdin/stdout/stderr; by default, subprocess tries to pass these on to the child process, which fails.
- If I use subprocess.call with stdin=PIPE, stdout=PIPE, stderr=PIPE (which opens a pipe between the child process and my parent Python process), everything works, but I get a command window that appears briefly on the screen. Because I call this child process a lot, I see a lot of distracting consoles opening and closing.
- Trying op.spawnl produces identical results to #2.
All the code works fine when running without --noconsole or running directly from Python. Any ideas on how to run a child subprocess successfully, but without opening a console window?
Thanks!
Bryan
--
Bryan A. Jones, Ph.D.
Associate Professor
Department of Electrical and Computer Engineering
231 Simrall / PO Box 9571
Mississippi State University
Mississippi state, MS 39762
http://www.ece.msstate.edu/~bjonesbjones AT ece DOT msstate DOT edu
voice
662-325-3149fax
662-325-2298Our Master, Jesus Christ, is on his way. He'll show up right on
time, his arrival guaranteed by the Blessed and Undisputed Ruler,
High King, High God.
- 1 Tim. 6:14b-15 (The Message)