Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
169 views
in Technique[技术] by (71.8m points)

Invoking python under CygWin on Windows hangs

Installing a new Windows system, I've installed CygWin and 64 bit Python (2.7.3) in their default locations (c:cygwin and c:Python27python), and added both the CygWin bin and the Python directory to my path (in the user variable PATH). From the normal command window, Python starts up perfectly, but when I invoke it from bash in the CygWin environment, it hangs, never giving my the input prompt.

I've done this on other machines, previously, but always with older versions of Python (32 bits) and CygWin, and with Python in a decidely non-standard location. Has anyone else had this problem, or could someone tell me what it might be due to?

question from:https://stackoverflow.com/questions/13588454/invoking-python-under-cygwin-on-windows-hangs

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Try this

python -i

and yes you will find some glitches here and there !!!

Option -i forces an interactive prompt as shown in Python help python -h page here.

$ python -h
-i  : inspect interactively after running script; 
      forces a prompt even if stdin does not appear to be a terminal;
      also PYTHONINSPECT=x

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...