#1
  1. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    155

    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?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    394
    Rep Power
    52
    Hi!

    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.

    Regards, mawe
  4. #3
  5. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    155
    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.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    394
    Rep Power
    52
    As far as I can see, idle is written completely in Python ... no need to learn C++
  8. #5
  9. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    155
    Oh. I didn't realize that. Thanks again.
  10. #6
  11. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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.

    http://ipython.scipy.org/

    Take care,

    Mark.
    programming language development: www.netytan.com Hula

  12. #7
  13. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    155
    Ok thanks netytan. I'll look into that as well.

IMN logo majestic logo threadwatch logo seochat tools logo