atom-community / atom-community/atom-script

Running script as Python 2 not working

Open
#1,501 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
730
Forks
264
PR merge metrics
No merged PRs in 30d

Description

Hi,

I just want to say that I am a relative beginner, so hopefully my question makes sense. :)

Using the profiles feature, I am trying to set commands for running in Python 2.7 or 3.6, based on the project/file. The newest versions of Python use the command 'py', and to use version 2, the command used is 'py -2.x' See [here](https://docs.python.org/3/using/windows.html#python-launcher-for-windows).

However, Script doesn't recognize 'py -2' or 'py -2.7' etc. as valid commands. I am getting errors such as `C:\Python27\python.exe: can't open file '2 -u C:\Users\shoni\Desktop\test.py': [Errno 22] Invalid argument`

The command 'py' uses the latest version on my computer (3.6.3), as it should, and 'python' does the same thing (even though on the command line 'python' yields 2.7)

How can we add a profile for using older versions?

Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.