469,602 Members | 1,882 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Re: [Tutor] Replacing cmd.exe with custom .py application

Joseph:
Check out subprocess. The subprocess module is on python
2.4. Also, use subprocess.call("your command",shell=True)

On Linux/Unix, the process is below

import subprocess

ret = subprocess.call("dir",shell=True,stdout=open('/dev/null','w'),stderr=subprocess.STDOUT)

print ret

You should get a return value of 0. Which means that it was
successful. I'm still learning this myself, so some of these other
guys might have more input.

On Tue, Sep 30, 2008 at 10:32 AM, A. Joseph <jo******@gmail.comwrote:
>

Instead of going to the command line all the time, I want to create a small
customized cmd.exe of my own, how can I get the return value from
os.system() because I was thinking I can do soothing with os.system(), In
case my question is not clear, just like an IDE that plugged in another
.exe application.

Sorry for any mistake in my question. Just help me if you can

_______________________________________________
Tutor maillist - Tu***@python.org
http://mail.python.org/mailman/listinfo/tutor



--
Ezra Taylor
Sep 30 '08 #1
0 1403

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by News | last post: by
3 posts views Thread by administrata | last post: by
7 posts views Thread by Rob Meade | last post: by
reply views Thread by Henry Stock | last post: by
6 posts views Thread by Greg M | last post: by
reply views Thread by Marian Heddesheimer | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.