开发者

User Input for Python in TextMate

开发者 https://www.devze.com 2023-02-21 14:32 出处:网络
I am using python in TextMate and I want to get user input, the co开发者_如何转开发de is: f = raw_input(\"Please enter your search term? \")

I am using python in TextMate and I want to get user input, the co开发者_如何转开发de is:

f = raw_input("Please enter your search term? ")

However when I run it in TextMate the following error appear

EOF when reading a line

but no problem when I run it in console, any one has any idea?


The only solution initially in my experience was to run the script from the command line i.e. outside of Textmate. However, further research shown that if one installed the file tm_interactive_input.dylib from https://github.com/alkemist/interactive-input/downloads in the location specified on the Macromates blog ( http://blog.macromates.com/2009/interactive-input/ ) this worked.


Try command key + shift + R to run it in terminal instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消