Thursday, 16 October 2014

Use Sublime text 2 to build python 3 files

Go to Tools > Build System > New Build System...

Now, copy the following JSON to it:

{  "cmd" : ["/usr/local/bin/python3", "-u", "$file"]}

Remember to put the complete path for you python program.
Save the file with name "MyPython.sublime-build"

To get a file, to be build by this new build system:

  1. Open
  2. Go to Tools > Build System , and choose MyPython from the list.
  3. Select Tools > Build, or press ⌘B
Happy coding!