473,320 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

cygwin python.exe symlink breaks when called from .bat file

gry
[Windows XP Pro, cygwin python 2.4]

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. I replaced it with a hard link and
all
is well. Is there some reason this shouldn't be the standard
installation
under cygwin?

Jul 18 '05 #1
2 3514
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
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&grou...70&atid=305470

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
Jul 18 '05 #2
gr*@ll.mit.edu wrote:
[Windows XP Pro, cygwin python 2.4]

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. I replaced it with a hard link and
all
You could rename the symbolic link python.exe to python. Bash finds it
anyway and cmd.exe will it ignore it. Several of the symbolic links are
created without .exe by the installation.

If you really want to use cygwin-Python from cmd.exe, use doskey to
create an alias or create a batch file.
is well. Is there some reason this shouldn't be the standard
installation
under cygwin?


Hard links are available only with NTFS volumes. (OK, you could create a
hard link with FAT*, but chkdsk will complain.)

Daniel
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jörg Maier | last post by:
Hey guys, i have a big problem using Tkinter and pexpect in cygwin. i try to program an winscp-like rsync Program for all posix Platforms (linux, macosx, cygwin). i got a class SslConnection...
18
by: Tad Marko | last post by:
Howdy! I'm trying to get my head around Python and I've come to realize that there are a lot of idioms in Python that are a bit different than in other languages. I have a class similar to what...
6
by: gry | last post by:
I want to write some kind of install script for my python app that will add c:\cygwin\usr\bin to the system path. I don't want to walk around to 50 PC's and twiddle through the GUI to: My...
34
by: Ross Reyes | last post by:
HI - Sorry for maybe a too simple a question but I googled and also checked my reference O'Reilly Learning Python book and I did not find a satisfactory answer. When I use readlines, what...
10
by: lawrence k | last post by:
I've got a script called makeRss.php. It works fine if I try to open it with my browser. It makes an RSS feed for every page on my site. You can see it working here: ...
8
by: John Salerno | last post by:
I figured my first step is to install the win32 extension, which I did, but I can't seem to find any documentation for it. A couple of the links on Mark Hammond's site don't seem to work. ...
0
by: Ross Patterson | last post by:
I recently was forced to build PIL under Cygwin Python 2.4.3 and ran into the Cygwin fork/rebase issue with TCL/TK yet again. Unfortunately, none of the rebase workarounds I found through my...
9
by: tubby | last post by:
Silly question, but here goes... what's a good way to determine when a file is an Open Office document? I could look at the file extension, but it seems there would be a better way. VI shows this...
2
by: faif | last post by:
Hello, I'm using a javascript function to pass the values of various form elements. The problem is that the script breaks when I'm trying to retrieve a value of an element that is not visible,...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.