How to eliminate consol window in MS Windows

Radovan Garabik garabik at melkor.dnp.fmph.uniba.sk.spam
Wed Nov 3 08:52:00 EST 1999


Fredrik Lundh <fredrik at pythonware.com> wrote:

 : you could try something like:

 : file = r"\full\path\pythonw.exe"
 : os.spawnv(os.P_NOWAIT, file, (file, "program.pyw") + tuple(args))

 : note that spawnv doesn't scan the path, and that
 : you need to pass the name of the excutable as the
 : first item in the argument tuple.

ok, thanks, it works. However...
I need to pass to program.pyw an argument, which is arbitrary string,
probably with spaces inside.
Passing is as a string passed only the first word. When I enclose
the string in quotes, it works, but when by chance there are quotes 
in orginal args, enclosing it again in quotes makes the whole
thing look ... funny.


-- 
 -----------------------------------------------------------
| Radovan Garabik http://melkor.dnp.fmph.uniba.sk/~garabik/ |
| __..--^^^--..__         garabik @ fmph.uniba.sk           |
 -----------------------------------------------------------
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!




More information about the Python-list mailing list