Silent python program 
Author Message
 Silent python program

Can anyone tell me how to run a python program in "background" on win32
platform.  I don't want any output to the screen.

thanks

Olav



Sun, 16 Nov 2003 15:58:59 GMT  
 Silent python program

Quote:
> Can anyone tell me how to run a python program in "background"
> on win32 platform.  I don't want any output to the screen.

the easiest way is to simply give it the ".PYW" extension.
when python installs it associates PYW with the "pythonw.exe"
this python executable is pretty much exactly the same as
"python.exe", except that it runs without a dos shell.


Sun, 16 Nov 2003 16:23:56 GMT  
 Silent python program

Quote:

>> Can anyone tell me how to run a python program in "background"
>> on win32 platform.  I don't want any output to the screen.

>the easiest way is to simply give it the ".PYW" extension.
>when python installs it associates PYW with the "pythonw.exe"
>this python executable is pretty much exactly the same as
>"python.exe", except that it runs without a dos shell.

This works great, but I if I make a executable file with freeze.py - the
dos-shell still appears.
Any Ideas?

Olav



Sun, 16 Nov 2003 16:40:34 GMT  
 Silent python program

Quote:

> >the easiest way is to simply give it the ".PYW" extension.
> >when python installs it associates PYW with the "pythonw.exe"
> >this python executable is pretty much exactly the same as
> >"python.exe", except that it runs without a dos shell.

> This works great, but I if I make a executable file with freeze.py - the
> dos-shell still appears.

Try py2exe - <http://starship.python.net/crew/theller/py2exe/>. The
--windows flag allows you script to run 'consoleless'.

Cheers,
Simon Brunning
TriSystems Ltd.

-----------------------------------------------------------------------
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.



Sun, 16 Nov 2003 17:12:47 GMT  
 Silent python program

hi,

Can I make a standalone out of this .pyw to make a prog that runs in
background ?
If no, how to do that sort of thing ?

/prasad

Quote:
-----Original Message-----

Sent: Wednesday, May 30, 2001 1:54 PM

Subject: Re: Silent python program


> Can anyone tell me how to run a python program in "background"
> on win32 platform.  I don't want any output to the screen.

the easiest way is to simply give it the ".PYW" extension.
when python installs it associates PYW with the "pythonw.exe"
this python executable is pretty much exactly the same as
"python.exe", except that it runs without a dos shell.

--
http://mail.python.org/mailman/listinfo/python-list

.



Sun, 16 Nov 2003 17:03:56 GMT  
 Silent python program

O> Can anyone tell me how to run a python program in "background" on win32
O> platform.  I don't want any output to the screen.

python script.py > nul
--

URL: http://www.cs.uu.nl/~piet [PGP]



Sun, 16 Nov 2003 20:26:38 GMT  
 Silent python program

Quote:

>This works great, but I if I make a executable file with freeze.py - the
>dos-shell still appears.
>Any Ideas?

RTFM will help..... freeze.py supports a '-s windows' switch.

Toby{*filter*}enson



Sun, 16 Nov 2003 20:40:30 GMT  
 Silent python program
Can anyone tell me how to make a python script "silent" on win32 platform,
as it was running in the background.  I don't want any output to the
screen.

Thanks
Olav



Sat, 15 Nov 2003 20:25:52 GMT  
 Silent python program



Quote:
> Can anyone tell me how to make a python script "silent" on win32 platform,
> as it was running in the background.  I don't want any output to the
> screen.

What about  the following ?

import sys
sys.stdout=sys.stderr=None

Andreas



Mon, 17 Nov 2003 09:24:33 GMT  
 Silent python program
|


| > Can anyone tell me how to make a python script "silent" on win32 platform,
| > as it was running in the background.  I don't want any output to the
| > screen.
|
| What about  the following ?
|
| import sys
| sys.stdout=sys.stderr=None

The "DOS box" will still be displayed.  Surprisingly enough I didn't
get a stack trace saying that "Object 'Non' has no 'write' attribute",
but then again the stack trace would b e sent to sys.stderr (None).

What Olav wants is to name his "main" script with the extension .pyw
instead of .py and the DOS box won't appear.  (It will use the
'pythonw' binary executable instead of 'python')

-D



Mon, 17 Nov 2003 10:32:05 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Silent program

2. Calling a python program within a python program

3. Silent for some days....

4. Windows events in silent

5. Funky87: SILENT.RTT needed

6. Silent Install NI Visa 2.6?

7. Silent Install for Rexx under NT

8. Admiral Tuttle (Should be silent ad for Oracle)

9. Windows install in alternate location with /silent?

10. Silent console application with CVF

11. help: silent failure on socket termination?

12. Win32: silent script

 

 
Powered by phpBB® Forum Software