By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,199 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,199 IT Pros & Developers. It's quick & easy.

os.system

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
>> 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

P: n/a
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.

Browse more Python Questions on Bytes