Sublime Text Python Tips

Working with both Python 3 and Python 2.7 in Sublime? Can't make yourself used to type print with brackets? Put this simple snippet in your Sublime Text User Package directory. It will autocomplete print statement with brackets.
Bonus tip for Linux users. Tired to switch build system from Python to Python 3 and back? Just want to Sublime Text use shebang/hashbang when running Build (F7) command? I.e:
- If your file starts with
#!/usr/bin/python3use Python3 - If your file starts with
#!/usr/bin/pythonuse Python - If your file starts with
#!/usr/bin/env pythonuse default Python version - If your file starts with
#!/bin/bashorperle.t.c., run file defined app..
Put this simple build system in your Sublime Text User Package directory, then select Tools → Build System → Run, and you will have universal runner based on file first line.
© 20xx
Hosted on Cloudflare Pages, which is awesome!
