简体   繁体   中英

Running Python Files from Pycharm Project Folder with Windows Command Line

I have watched numerous tutorials on how to run Python files using the windows command line (CMD.exe), but in all of the tutorials the video makers were accessing PythonXX from Program Files and also their Python files from Program Files. I use Pycharm and have my single Project Folder in my Documents library. If possible I would like to run those files from the project folder. If not, though, is there any way to relocate a Pycharm Project Folder and Pycharm will still recognize it as where I store my files?

Thanks!

EDIT:

YES, I am aware that I can run my Python Files in Pycharm, but I would like to use windows CMD for full screen and so I can watch over it while I code.

To get to a directory with cmd simply hold shift while right-clicking the Documents folder. You should get an option

Open command window here

在此处输入图片说明

To run python files, enter into cmd:

python filename.py

Modify this command to include arguments if necessary.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM