N
N
NHTZ2021-05-15 20:09:24
Python
NHTZ, 2021-05-15 20:09:24

How to open a .py file on the command line as an application?

I’m writing a program according to the guide, in the video the guy just writes python3 server.py in cmd, and in addition to me, when you enter all the above cmd, it just displays the text “Python” to me, it doesn’t open the program itself, but opens its code in notepad ++, what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rPman, 2021-05-15
@rPman

What happens if you just write?
python
or
python3 , a pyrthon
text console should appear, like this:

Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
here you can enter and execute python code (this is a type of console ide), exit() to exit.
If this is not the case, then python is installed incorrectly and you need to reinstall it
. behavior, change...), or with the ftype and assoc commands. There are also menu item settings (such as open, edit, etc.) In windows 8..10 or even earlier, they introduced personal user settings and global ones for all users.
See the answer for an example.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question