On 9/14/06, nimrodx <[EMAIL PROTECTED]> wrote: > Basically a dumb question I can't seem to find the answer to. > > How do I execute a bash command from within a python program.
Well, this question doesn't match the subject line. So, *two* answers. To open a web browser from within a python program, you want something like: import webbrowser webbrowser.open('www.google.com') To run a shell command - well, it depends. If you don't care about reading the output or so on, you can just do: import os os.system('ls') If you want to access the input and/or output streams, or to wait for the shell command to finish, or anything even remotely complex, look at the subprocess module. -- Cheers, Simon B, [EMAIL PROTECTED] _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor