[英]how to run python code in atom in a terminal?
我是编程和原子的初学者,所以当尝试在终端中运行以原子编写的python代码时,我不知道如何...我尝试安装像run-in-terminal,platformio-ide-terminal这样的程序包,但我不知道如何使用它们。
python <filename>.py
if you are using python2 python <filename>.py
python3 <filename.py>
if you are using python3 python3 <filename.py>
I would not try to do it using extensions. 我不会尝试使用扩展来做到这一点。 I would use the platformio-ide-terminal and just do it from the command line.
我将使用platformio-ide-terminal并仅从命令行执行。
Just type: Python script_name.py and it should run fine. 只需输入:Python script_name.py,它应该可以正常运行。 Be sure you are in the same directory as your python script.
确保您与python脚本位于同一目录中。
"python filename.py" should run your python code. “ python filename.py”应运行您的python代码。 If you wish to specifically run the program using python 3.6 then it would be "python3.6 filename.py".
如果您希望使用python 3.6专门运行该程序,则应为“ python3.6 filename.py”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.