Parker Jenkins
Parker Jenkins

Reputation: 1

Python: Command Prompt File

I've written a program called pyramid.py and I'm trying to access it from the command prompt.

So far I've tried typing the name out: Resulting in a NameError

Here

And I tried dragging the file into the window: Resulting in a SyntaxError

Here

Upvotes: 0

Views: 32

Answers (1)

Barmar
Barmar

Reputation: 780724

You give the script file as an argument to the python command:

C:\Users\Parker>python3 pyramid.py

Upvotes: 1

Related Questions