Forums

Open my file with 2.7 instead of 3.4

Hi all I have been at this for a few hours now and I can not seem to figure out how to switch to 2.7 for my file to open in.

I uploaded my file and it is in zerocool5878 folder. When I click it it opens in 3.4 which of course breaks it.

I read something about running this in a bash console which i did and then reuped the file in there as well. virtualenv --python=python2.7 myvenv

Is there a line of code that must be on the top of my file in order to open with 2.7?

I am sure it is something simple I just cant seem to find info any about it under help

Thanks for your time Mike

I figured it out. :)

#!/usr/user/local/bin/python2.7

[edited by admin: formatting]

The default python in a Bash console is 2.7.6 at the moment, so you could just type something like 'python main.py' in a console.

With respect to the click and run button from the file tab, we do have the default (if you don't specify #! to the executable) to be python3. if you prefer 2.7 for all of your code, we can also chg the default for you if you msg us.