Filipe Ferminiano
Filipe Ferminiano

Reputation: 8801

Python interactive mode on SublimeREPL

I'm trying to run Python on SublimeREPL, but python is not on interactive mode.

So when I send a line to sublimeREPL, it just shows something if it's an error or if I print something. How can I change python to interactive mode?

Upvotes: 1

Views: 547

Answers (2)

Stefan
Stefan

Reputation: 46

Found a solution:

After setting up Python on SublimeREPL, go to Keybindings - User and add this code below. It will be just like the normal PythonIDE!

[
{ "keys": ["f8"], "command": "repl_open", 
             "caption": "Python",
             "mnemonic": "p",
             "args": {
                "type": "subprocess",
                "encoding": "utf8",
                "cmd": ["python", "-i", "-u", "$file"],
                "cwd": "$file_path",
                "syntax": "Packages/Python/Python.tmLanguage",
                "external_id": "python"
                } }
]

Upvotes: 3

adam b
adam b

Reputation: 356

I'm not understanding your problem with that? Python will only log data to the console if you print something or it encounters an error, there is nothing else to show usually.

Regardless, Python should be preconfigured on SublimeREPL. Look at the documentation, and if that doesn't help then look at this guide. However it doesn't sound like there's anything going wrong.

Upvotes: 1

Related Questions