How to run commands in command line from a script

Ivan Shevanski darkpaladin79 at hotmail.com
Fri Jul 1 11:08:05 EDT 2005


Well, the thing is that I was just using changing directories as an example 
for running a name specific command, is the <long winded reply here> the 
only way to run name specific commands? An example would be (what I am 
actually trying to do) run the simply command
mame s1945
in the command line.  MAME is, for those of you that care, the multaple 
arcade machine emulator and the command runs the classic game strikers 1945. 
  I'm just trying to automate the tedious process of running it through the 
command line.  By the way, thanks to everyone who responded I'm really 
getting along here.

Thanks,
-Ivan




> >
> > Generally, the only way to use an application (i.e. a program like the
> > Python interpreter, or your own .exe) to change the working folder is to
> > have your script executed from within a batch file, write out a new
> > batch file in your script, and then have the calling batch file execute
> > that script if it exists.
>
>And, after that long-winded reply, here's another option, if you're just
>trying to change the directory _within_ your app but don't care if the
>change persists:
>
>import os
>os.chdir(r'c:\Program Files')
>
>-Peter
>--

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/




More information about the Python-list mailing list