better use of os.system()

Bob Roberts bobnotbob at byu.edu
Mon Sep 15 10:28:02 EDT 2003


Fooman <fee at fee.com> wrote in message news:<181d118be52ffabbbeaa120340c3f759 at news.teranews.com>...
> > lower: not found
> > 
> > I want it to run "lower" just like it would if I typed "lower" at the
> > bash prompt.  How can I do that?
> 
> The problem is that the 'lower' script is not in the path that
> the python interpreter knows about.  You can do:
> 
> 	os.system("/my/nonstandard/pathto/lower")
> 
> or, if you are using Linux, or similar, you can try
> making sure that your $PATH variable is getting set to
> include the path to your script in the environment that
> the python interpreter gets launched in.
> 
> So, what platform are you running under, and what is the
> path to your 'lower' script, and what are the contents
> of your $PATH variable?


I am running under cygwin (it acts like linux in many respects), using
the cygwin-built version of python.  The path to "lower" is
~/bin/lower, and ~/bin is in my $PATH.




More information about the Python-list mailing list