473,386 Members | 1,763 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,386 software developers and data experts.

Re: Getting Python to run Python Scripts in cygwin

Le Thursday 19 June 2008 18:14:03 Calvin Cheng, vous avez écrit*:
Hi guys,

This may be a cygwin issue but I was hoping to get some answers here
as well if someone has fixed this problem before.

Basically, I am able to run "python <scriptname>.py" python files in
command prompt. Unfortunately, I can't seem to get it to work in
cygwin. I always get an error that says:
python: can't open file '<scriptname>.py': [Errno 2] No such file or
directory
I don't think this is a python problem. Unlike dos, unix (and cygwin) dont
look for executables in the current dir by default. Do you correctly
type './yourscript.py' rather than 'yourcript.py' ?
If it doesn't help it might be an end-line problem : python doesn't care about
them, but the shebang line is parsed by cygwin and should match the end-line
style you've chosen at cygwin installation time. (See
http://en.wikipedia.org/wiki/Newline#Common_problems)

--
Cédric Lucantis
Jun 27 '08 #1
0 1351

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

Similar topics

7
by: Robin Becker | last post by:
I wonder if this is the right way to write a medusa(asyncore) server with the win32all framework. Other example services seem to create an event to pass the stop signal from SvcStop into a separate...
3
by: Nicolas Lehuen | last post by:
Hi, Is it me, or does anyone else get significantly better pystone results under Cygwin versus the standard Win32 build ? CYGWIN 1.5.6 + python 2.3.3-1 : $ time python...
2
by: Jorgen Grahn | last post by:
I couldn't think of a good solution, and it's hard to Google for... I write python command-line programs under Win2k, and I use the bash shell from Cygwin. I cannot use Cygwin's python package...
2
by: Eric Woudenberg | last post by:
I just installed a Python 2.3.4 Windows binary on a friend's WinXP machine (because the latest Cygwin-provided Python 2.3 build leaves out the winsound module for some reason). When I try and...
16
by: Kenneth McDonald | last post by:
For unfortunate reasons, I'm considering switching back to Win XP (from OS X) as my "main" system. Windows has so many annoyances that I can only compare it to driving in the Bay Area at rush hour...
10
by: John Salerno | last post by:
Is there a way to 'install' and use Python on a memory stick, just as you would on any computer? I use Windows, and I know the installation does things with the registry, so probably I couldn't use...
2
by: Mick Duprez | last post by:
Hi All, I've installed Python 2.5 on a number of machines but on one I'm having problems with the CLI. If I fire up the 'cmd' dos box and type 'python' I get a line of gibberish and it locks up...
1
by: Calvin Cheng | last post by:
Hi guys, This may be a cygwin issue but I was hoping to get some answers here as well if someone has fixed this problem before. Basically, I am able to run "python <scriptname>.py" python...
0
by: Jason Tishler | last post by:
Calvin, On Fri, Jun 20, 2008 at 12:14:03AM +0800, Calvin Cheng wrote: Are you executing python in the same directory in Cygwin as you are in the command prompt? If not, then python will not...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.