Sublime Forum

Run Python3 Code with input

#1

Hello,

I am completely new at Sublime but I read many howtos and watched around 30 youtube tutorials in order to get in touch with the cool features of sublime.

The only thing I was not able to find out was that when I use for example z = input() in my script and I start the python3 script using “Tools” -> “Build” I am able to see all script output until the input line but I am not able to type in the input for z. For me it seems to be that the my return value in sublime is not send back to my script.

Does anyone has an idea ?

BR Marc

0 Likes

Build broken? - Python 3 - input()
Run python scripts by just pressing a key on linux(xubuntu)
#2

You can’t have input with the built-in Build System. You can use it with SublimeREPL.

0 Likes

#3

It can be done by running a command prompt in parallel with your Python build.

Here is an implementation I posted for someone who requested the same thing for Java:
Sublime user input into console (using scanner class with java and running programs in sublime)

I haven’t set one up for Python yet, but you should be able to modify it to fit your needs.

1 Like