Issue with Sublime Text 3's build system - can't get input from running program

后端 未结 2 1548
北恋
北恋 2020-11-22 09:38

I\'m trying to get Sublime Text 3 (build 3049, if that matters) to run a Python script. A simple two liner

var = raw_input(\"Enter something: \")
print \"You         


        
2条回答
  •  没有蜡笔的小新
    2020-11-22 10:15

    Sublime Text does not support inputting data into a program. For working with inputs you need to install a package called SublimeREPL. Follow this:

    1. open Sublime Text >> CTRL + P

    2. CTRL + P will open the Package control

    3. Click on Package Control: Install package
    4. Wait for a sec to pop up a search bar.
    5. Type SublimeREPL and Click it. It'll get installed in a few secs.

    Then follow the following steps to run your program;

    1. Tools >> SublimeREPL >> Python >> Python run Current File

    It'll open a new window, where you can give your input and get the output.

提交回复
热议问题