ioquatix / script-runner

This package will run various script files inside of Atom. It currently supports JavaScript, CoffeeScript, Ruby, and Python. You can add more.
http://atom.io/packages/script-runner
Other
62 stars 23 forks source link

Changing version of python #48

Closed hyphen-wrex closed 8 years ago

hyphen-wrex commented 8 years ago

Hello, how can I change the version of python that I'm using?

huba commented 8 years ago

The best way to do this is to change the shebang line.

hyphen-wrex commented 8 years ago

Sorry for not commenting about that in the first place. I meant that atom-runner have a line in atom configuration file to change the python binary to use. Since this package is the fork of atom-runner, I expected it to work the similar way, but found nothing about that in readme.md; could you please clarify this to me? Using mac

ioquatix commented 8 years ago

@hyphen-wrex We don't support that mode of configuration. The reason is that it is non-standard. It is better to work the same way the rest of the system and shell works, e.g. use #!/usr/bin/env python2.7 or #!/usr/bin/env python3.4 etc. This way when you run the script from the command line it will also work correctly. IF you want python to default to something, why not set that up in your shell so it also works correctly there?

hyphen-wrex commented 8 years ago

@ioquatix That is true indeed; Googled about shebang and setting up python in command line via aliases and made it in local file like you exampled; Big Thanks!