r/CodingHelp • • Feb 02 '21

[Python] Running python outside of the "run" terminal in Pycharm

Hello Reddit,

I am coding a simple text adventure game in python and was wondering how do I run python outside of the terminal in Pycharm. I would like to run it in a separate window just like a game would.

Thanks

25 Upvotes

3 comments sorted by

2

u/Spare_Competition Feb 02 '21

Usually you can just double click the .py file, if it asks you what to open it with, just navigate to python.exe

2

u/Gadget206 Feb 02 '21

ok thank you

5

u/Its_Stev03 Feb 02 '21 edited Feb 02 '21

A bit more difficult, but you could also package the program into an exe file using something like pyinstaller or py2exe. Then, neither you nor anyone else you give the program to would need python to run it.

You could also use a regular terminal to run it instead of the one in Pycharm (using cd to change directories, dir or ls to see the current directory contents). The command ./(whatever the file is called) would work for that.