Running python from cygwin with .py-extension --- import: not found

Olav OlavB at yahoo.com
Thu Sep 14 11:03:02 EDT 2000


Steve Holden wrote:

>
>
> I'm guessing that your shell is finding a "print" command on your PATH,
> but that the "print" command can't find what it thinks to be a file.
>

....You are right!

>
> > > I tried to use a script with a '#!/usr/bin/env python' first line
> > > and it works exactly as in UNIX, ie call it directly after a 'chmod +x'.
> >

I tried that.  It works! I just to make a link to have /usr/bin/env point to
something
(Cygwin was probably not in the standard location)

>
> > I am uing PATHEXT=.COM;.EXE;.BAT;.CMD;.ph
> > (in the NT environment this variable is in fact not visible in cygwin)
> >

I had in fact misspelled .ph instead of .py....  With this i can remove the
extenion
in NT, but not Cygwin.  Perhaps NutCracker would handle this better?
(I remember before i often needed the .bat-extension in Cygwin, but not
NutCracker)

>
>
>         http://www.toolwood.dk/freeware/PythonLauncher
>
>

It also works, though both this and the "#"-method breaks when I try to run
scripts on my D-drive.
Cygwin will give Python a path starting with //D, which it can't find... (My
current drve is then the
C-drive, and Python.exe is also on the C-drive.

Anybody got a way around that?

Deja-thread:
http://x55.deja.com/[ST_rn=ps]/threadmsg_ct.xp?AN=666929814.1&mhitnum=3&CONTEXT=968943033.1105199120

Thanks Again!
Olav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20000914/e9c8cc05/attachment.html>


More information about the Python-list mailing list