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

Alan Gauld alan.gauld at btinternet.com
Tue Sep 30 23:23:09 CEST 2008


"A. Joseph" <joefazee at gmail.com> wrote

> Instead of going to the command line all the time, I want to create 
> a small
> customized cmd.exe of my own,

I'm not sure that I understand what you are trying to do.
But trying to replace cmd.exe is a very very bad idea.
Lots of bits of your operatinfg system rely on cmd.exe
and bad things are likely to start happening!

> how can I get the return value from
> os.system()

Same as any other function:

retval = os.system('notepad.exe')

> 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, that didn't clarify anything for me! :-)

Are you trying to write your own operating system shell
environment (to use instead of cmd.exe)? Are you trying to
write a Python based command shell? Or are you trying
to create your own IDE?

I'm confused.

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 




More information about the Tutor mailing list