473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 1658

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: News | last post by:
Hello. I've just started learning Python a few weeks ago. I'm using the free "How to Think Like a Computer Scientist: Learning with Python". I'm half-way through chapter 5 and I've been stumbling...
3
by: administrata | last post by:
i'm using tutor maling... i e-mail some questions to tutor and get answers. but, i frequently get mails which aren't related with my question. how should i stop it?
7
by: Rob Meade | last post by:
Hi all, Been a long time since I've been here... /me waves to all.. Ok - my conundrum.. I have a form where a user can enter text and BB codes...for example:
4
by: Tim M. | last post by:
one of my assignments is create a class named numbers whose Main()method holds two interger variables, assign values to the variables. within the class, create two methods, Sum() and...
0
by: Henry Stock | last post by:
I have been studying c-sharp for a while, but I have a project that will involve much learning along the way. I am looking for a person that would be willing to consult with me that has experience...
6
by: Greg M | last post by:
I have 5 years of MS Access/VBA development experience and am moving into the VB.net world. I am seeking a tutor which could facilitate this move. I live in Anderson, IN and am willing to...
0
by: Marian Heddesheimer | last post by:
Rent-a-Tutor.com is in search for testers as online-courses students. As operators of rent-a-tutor.com we are proud to offer high quality online courses over the internet at reasonable prices. At...
10
by: Scott M. | last post by:
I've seen many posts and ready articles discussing how changing the membership & roles "provider" in VS .NET is easy, but have yet to see instructions on how to do it. If I already have SQL...
0
by: Ezra Taylor | last post by:
Is there something similar to /dev/null on Windows? On Tue, Sep 30, 2008 at 2:13 PM, Ezra Taylor <ezra.taylor@gmail.comwrote: -- Ezra Taylor
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.