* Problem with env?
@ 2013-12-25 9:56 İsmail Dönmez
2013-12-25 15:47 ` Kurtis Rader
0 siblings, 1 reply; 2+ messages in thread
From: İsmail Dönmez @ 2013-12-25 9:56 UTC (permalink / raw)
To: Zsh Users
Hi,
I have a very simple script:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
import sys
print("%s.%s.%s" % (sys.version_info.major,
sys.version_info.minor,
sys.version_info.micro))
This is supposed to run in python3. With zsh 5.0.2 (x86_64-suse-linux-gnu):
[~]> ./test.py
2.7.5
So it runs python instead of python3. With bash 4.2:
[~]> ./test.py
3.3.2
So obviously something going on with zsh or my zsh setup. Any ideas?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Problem with env?
2013-12-25 9:56 Problem with env? İsmail Dönmez
@ 2013-12-25 15:47 ` Kurtis Rader
0 siblings, 0 replies; 2+ messages in thread
From: Kurtis Rader @ 2013-12-25 15:47 UTC (permalink / raw)
To: İsmail Dönmez; +Cc: Zsh Users
[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]
I don't see how it can have anything to do with zsh per se. The kernel is
responsible for interpreting the #! line and running the /usr/bin/env
program which in turn just uses the PATH env var to find the named binary.
So what does the output of these commands look like for each environment:
echo $PATH
which python3
On Wed, Dec 25, 2013 at 1:56 AM, İsmail Dönmez <ismail@donmez.ws> wrote:
> Hi,
>
> I have a very simple script:
>
> #!/usr/bin/env python3
> # -*- coding: utf-8 -*-
> #
>
> import sys
> print("%s.%s.%s" % (sys.version_info.major,
> sys.version_info.minor,
> sys.version_info.micro))
>
> This is supposed to run in python3. With zsh 5.0.2
> (x86_64-suse-linux-gnu):
>
> [~]> ./test.py
> 2.7.5
>
> So it runs python instead of python3. With bash 4.2:
>
> [~]> ./test.py
> 3.3.2
>
> So obviously something going on with zsh or my zsh setup. Any ideas?
>
--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-25 15:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-25 9:56 Problem with env? İsmail Dönmez
2013-12-25 15:47 ` Kurtis Rader
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).