June 23rd, 2005, 09:08 AM
Executing Files with own Console
I'm considering creating a fully functional OSS (Operating System Shell), in Python of course, but I wanted it to be able to run a console (command prompt for windows) application from within itself. What I mean by this is that it can execute the file, and through the console that was personally created by me, will output any text from the program that is necessary. So if someone wanted to run the windows command prompt through my program, my console program that is built into the OSS would run the command prompt in my own console, whatever the command prompt outputs to the screen, my console will do. It would also be a good idea for it to be able to send back input to a program, such as the command prompt. The problem is I have no clue how to start something like this, not the OSS itself, but just the Console part. Any ideas or sites that may lead to such a thing?
June 23rd, 2005, 09:16 AM
I don't really know how to do this, but it may be a good idea to look how idle does it. Also, wxPython has something like that, called pyshell.
June 23rd, 2005, 10:13 AM
The source to IDLE is public I'm pretty sure. I know some C++ (still learning) so I guess I could see somewhat how it works. PyShell may also be a good choice. Thanks mawe.
June 23rd, 2005, 10:22 AM
As far as I can see, idle is written completely in Python ... no need to learn C++
June 23rd, 2005, 10:56 AM
Oh. I didn't realize that. Thanks again.
June 23rd, 2005, 05:47 PM
You might also want to take a look at iPython, where it isn't a shell in the sense that you want it is a nice step forward when it comes to running Python as a System style shell.
June 23rd, 2005, 06:26 PM
Ok thanks netytan. I'll look into that as well.