[Tutor] i can't for the life of me get "#! /usr/bin/env python" or "#!/usr/bin/python" to work

Luke Paireepinart rabidpoobear at gmail.com
Thu Oct 22 00:15:58 CEST 2009

On Wed, Oct 21, 2009 at 5:12 PM, Luke Paireepinart
<rabidpoobear at gmail.com>wrote:

> On Wed, Oct 21, 2009 at 4:56 PM, Jason Willis <chaoticslacker at gmail.com>wrote:
>> so i changed the .bashrc and added at the end :
>> PATH="/home/compy/pythons:$PATH"  ###which is the actual path to my python
>> proggies###
> No, you have to set the environment variable from within the path, not
> modifying .bashrc.  $PATH refers to your current path.  If you're in, say
> /temp/mystuff , and you set the environment variable from there, then it
> will set PATH="/home/compy/pythons;/temp/mystuff"  but if you edit the file
> directly it can't retrieve the value of $PATH (an envrionment varaible) so
> it actually adds the value "$PATH" to your path, which probably doesn't
> exist unless you mkdir $PATH and put your files in it and run it that way.

So what you really want to do is
export PATH=$PATH:/home/compy/pythons

from the command line.
Unless I don't understand what .bashrc is for which is definitely possible,
I'm a Windoze programmer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20091021/4c37fa49/attachment-0001.htm>

More information about the Tutor mailing list