cygwin python.exe symlink breaks when called from .bat file
Jason Tishler
jason at tishler.net
Thu Dec 16 07:16:46 EST 2004
George,
Please keep your replies on-list.
On Wed, Dec 15, 2004 at 01:36:03PM -0500, george young wrote:
> On Wed, 15 Dec 2004 10:56:17 -0500
> Jason Tishler <jason at tishler.net> threw this fish to the penguins:
> > On Wed, Dec 15, 2004 at 07:21:31AM -0800, gry wrote:
> > > Under cygwin, the python executable is installed as python2.4.exe
> > > with a symbolic link to python.exe. This is fine as long as one
> > > is operating only withing the cygwin world. But I execute python
> > > from a foo.bat file, and windows barfs on the symbolic link.
> >
> > You can always do the following as a workaround:
> >
> > C:\> bash -c python
>
> Hmm, that's fine for typing a command interactively, but try fitting
> it into a DOS "ftype" command so that double-clicking a .py file gets
> the right thing with the right args -- nasty, I couldn't get it to
> work.
Since you are looking for tight integration with Windows, maybe you
should use Win32 Python?
> > > I replaced it with a hard link and all is well.
> >
> > Note the above will only work as a true hard link under NTFS. IMO,
> > the above is a better approach.
> >
> > > Is there some reason this shouldn't be the standard installation
> > > under cygwin?
> >
> > Because it would require (more) modification of the Unix build to
> > accommodate Windows. IMO, it is not worth the effort. If you feel
> > differently, then submit a patch for consideration:
> >
> > http://sf.net/tracker/?func=add&group_id=5470&atid=305470
>
> I'll try that... maybe I can light a fire.
>
> > BTW, many other Cygwin commands have this issue too:
> >
> > $ find /bin -type l -name '*.exe'
> > /bin/awk.exe
> > /bin/c++.exe
> > /bin/captoinfo.exe
> > /bin/cc.exe
> > ...
Jason
--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D 8784 1AFD E4CC ECF4 8EF6
More information about the Python-list
mailing list