Input in the Sublime Text builder

4

I'm using Sublime Text to study python, but it does not support input

When running the following code with the sublime build:

velocidade = int(input("Digite a velocidade: "))

I get the following error:

Digite a velocidade: Traceback (most recent call last):
File "/Users/matheusbaumgart/Desktop/python/outros/blank.py", line 1, in <module>
velocidade = int(input("Digite a velocidade: "))EOFError: EOF when reading a line

Does anyone know a good solution for using direct input in the sublime?

    
asked by anonymous 07.03.2014 / 21:52

1 answer

4

I suggest experimenting with the SublimeREPL tool. With it you can create a tab to be used as an interactive input for your program.

Source: this answer in SOEN

Note: I see that you are using input and then trying to convert to int . This is not necessary. input already reads the content as Python code, while raw_input " returns it as a simple string (ie input(prompt) is equivalent to eval(raw_input(prompt)) ). For security reasons, I suggest using raw_input whenever possible.

    
07.03.2014 / 22:02