469,903 Members | 1,705 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

os.system

My code is " os.system("NET SEND computer hihi") "
i use this funtion on Windows server 2003.
it's ok.

But the same code running on Windows XP SP2, it shows the command window
twice.
How do i remove the command window?


Jul 19 '05 #1
3 1618
Am Fri, 10 Jun 2005 17:10:23 +0800 schrieb Austin:
My code is " os.system("NET SEND computer hihi") "
i use this funtion on Windows server 2003.
it's ok.

But the same code running on Windows XP SP2, it shows the command window
twice.
How do i remove the command window?


Hi,

You can remove the command window which comes
from python if you use ".pyw" as extension.
This is not an answer why the system method
opens a second window, but maybe it helps, too.

Thomas

--
Thomas GŁttler, http://www.thomas-guettler.de/
Jul 19 '05 #2
>> My code is " os.system("NET SEND computer hihi") "
i use this funtion on Windows server 2003.
it's ok.

But the same code running on Windows XP SP2, it shows the command window
twice.
How do i remove the command window?


Hi,

You can remove the command window which comes
from python if you use ".pyw" as extension.
This is not an answer why the system method
opens a second window, but maybe it helps, too.

Thomas


Hi, but my program is complied from py2exe.
All extension is 'pyd'.
Hm... is there any way to do?
Jul 19 '05 #3
Austin wrote:
My code is " os.system("NET SEND computer hihi") "
i use this funtion on Windows server 2003.
it's ok.

But the same code running on Windows XP SP2, it shows the command window
twice.
How do i remove the command window?


Hi,

You can remove the command window which comes
from python if you use ".pyw" as extension.
This is not an answer why the system method
opens a second window, but maybe it helps, too.

Thomas

Hi, but my program is complied from py2exe.
All extension is 'pyd'.
Hm... is there any way to do?


no time to test, but the "subprocess" module might be what you need:

http://www.python.org/dev/doc/devel/...ubprocess.html
http://www.effbot.org/downloads/#subprocess (for 2.2 and 2.3)

(I assume you're already using the "windows" py2exe option for your
own program)

</F>

Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Terrence | last post: by
2 posts views Thread by Scott | last post: by
5 posts views Thread by laks | last post: by
reply views Thread by NicK chlam via DotNetMonster.com | last post: by
2 posts views Thread by =?Utf-8?B?TmF0aGFuIFdpZWdtYW4=?= | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.