Dealing with Multiple Python Versions— do not run independently

后端 未结 5 1313
无人共我
无人共我 2021-01-14 03:09

I have Python 2.7 (my preferred version) and 3.3 (version used in my Programming class) installed on my computer (OS: Windows 7). Until a certain point, they worked fine ind

5条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-14 03:45

    You can invoke the python interpreter in Python3.3 by running py filename.py while if you run them in Python 2.7 you can just run python filename.py.

    On my windows box I have small batch scripts (called python2 and python3) which call the relevant python source.

    filename:    python3.bat
    code:        C:\Python32\python.exe %*
    

提交回复
热议问题