Python learning Editor
1: Why use the text editor?
In the python interaction environment of cmd, execution of the python code will immediately get the result, but the Code cannot be saved. You have to rewrite the code next time. Therefore, you must use a text editor. For example, NotePad ++
In the text editor, after compiling the python code, save the file with the suffix. py. It cannot be another suffix!
Then enter the cmd command line mode, enter the directory where the python file is located, and execute python helloworld. py
2: the command line mode and Python interaction mode should be distinguished here:
Command Line Mode: python XXX. py can be executed. <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + signature/Signature + sLrtcS5/Signature + signature/Signature + cve-vcd4kpha + PGJyPgo8L3A + signature + xMfR + signature/PC9zdHJvbmc + signature/ export/Kx7/J0tS1xKOst723qMrH1No8Y29kZT4ucHk8L2NvZGU + zsS8/rXEtdrSu9DQvNPJz6O6PC9wPgo8cHJlIGNsYXNzPQ = "brush: java; "> #!/usr/bin/env python
Then, run the following command:
$ chmod a+x hello.py
You can directly runhello.py
For example, run the following command on a Mac: