Go to preferences -> Keybindings - User
and paste this. Make sure there are only one set of []
in your file, if you have custom keybinds set already then add a ,
after your last }
then paste everything but the []
at the beginning and end after your ,
.
[
{ "keys": ["ctrl+shift+r"], "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"
}
}
]
Save and quit Sublime Text.
Follow these instructions
How to add to the pythonpath in windows 7?
You should now be able to run your current file in repl with crtl+shift+r
Open sublime text and create a new file. Save it as hello.py
Type:
print('Hello World')
Save then hit ctrl-shift-r
See if that works