#!/usr/bin/env python vs. #!/usr/bin/python

Brian Vanderburg II BrianVanderburg2 at aim.com
Thu May 8 08:55:54 EDT 2008


D'Arcy J.M. Cain wrote:
> On Thu, 08 May 2008 07:31:17 -0400
> Brian Vanderburg II <BrianVanderburg2 at aim.com> wrote:
>   
>> This is sort of related, but I'm wondering what is different between 
>> "#!/usr/bin/env python" and "#!python".  Wouldn't the second do the same 
>> thing, since an absolute path is not specified, find 'python' from the 
>> PATH environment,  I don't really know.
>>     
>
> Well, I know what happened when I tried it.  What happened when you
> tried it?
>
>   
I haven't tried it but I've seen some files like written that in the 
past with just a name and no path for some other interpreter (perl or sh 
probably) and didn't know what the different was or if it was even 
valid.  I at a windows system now so I can't try it yet.

Brian Vanderburg II



More information about the Python-list mailing list