1

I am using python in TextMate and I want to get user input, the code 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?

Anatolij
  • 597
  • 3
  • 11
drhanlau
  • 2,517
  • 2
  • 24
  • 42
  • possible duplicate of [raw_input causing EOFError after creating exe with py2exe](http://stackoverflow.com/questions/4280889/raw-input-causing-eoferror-after-creating-exe-with-py2exe) – N 1.1 Apr 01 '11 at 07:17
  • http://stackoverflow.com/questions/5217258/unexpected-eof-while-parsing – N 1.1 Apr 01 '11 at 07:19

2 Answers2

3

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.

user733253
  • 31
  • 3
  • 1
    Works great with Snow Leopard. Will the next Textmate version include this by default again? – Sney Jul 13 '11 at 23:07
1

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

KLDavenport
  • 659
  • 8
  • 24