Using Python within TextMates own Script Engine You can add or modify a global PATH shell variable to TextMate -> Preferences (see above) by adding the path to your python3 interpreter. As soon as you use the TextMate integrated Script Engine it will use Python Version 2 instead. #!/usr/local/bin/python3.1 this line at the beginning hard wires python3.1 interpreter to the fileĪll the above mentioned solutions are pretty easy to realize and working great, but do have one downside! You have to use the Terminal.app to execute the PY-File.Hardwire the Python Path within your PY-File using a shebang.enter TM_PYTHON in the Variable field and the full path to the python in the Value field (perhaps /usr/local/bin/python3.1).From the TextMate menu bar, open TextMate -> Preferences.Close the Information window and save the Project (File -> Save Project As).Enter TM_PYTHON in the Variable field and the full path to the desired python in the Value field (for example, /usr/local/bin/python3.1).Click on the Get Info (i) icon in the sidebar.De-select any file in the project list sidebar.Open a new or existing TextMate Project (File -> New Project or File -> Open).Set Up Python 3 to be used on a per Project Base.
0 Comments
Leave a Reply. |