thuyein
thuyein

Reputation: 1792

Python command-line mode error

I have some difficulties trying to run the python programs from cmd, or command-line. When i double click the python program it display the cmd for some seconds in fact less than 3 Seconds, and cmd disappeared. I can only run by right clicking on it then edit in idle and run model command. Only from the python shell. And how to give path for python shell to find applications, for instance just type the program name and it runs. Do python have GUI as exe programs?

Upvotes: 0

Views: 189

Answers (1)

BrtH
BrtH

Reputation: 2664

First make sure python.exe is in your path.
Then type in the command prompt (cmd) python "path\to\program.py"

If you want to just type the progam name, you have two options.

  1. Add the folder containing your program to your path.
  2. Right click in the folder while holding shift, and then click "open command prompt here"

Upvotes: 1

Related Questions