Jun-05-2021, 02:36 PM
Im running Windows10. Downloaded Python 3.8.1. Downloaded PyCharm 2021.1.1. Also use basic editor UltraEdit.
If I type 6*2 & enter into Python prompt the answer 12 appears, so Python is working.
But Im having difficulty opening my first Python project.
In my text editor, UltraEdit, I have created files & copied & pasted 2 simple text editor scripts & cant get either to open.
The most simple one provides a short script that starts with the screen only. I cant even get that to open. That coding is as follows;
python /pathto/texteditor.py - I changed that to - python /pythonprojects/texteditor.py
and hit enter. You should see a screen that looks like the picture above. (Header & Footer)
When I paste python /pythonprojects/texteditor.py into the Command prompt a window appears showing the path & the words "Run command" below, and below further
Open
Run as Administrator
Open file location
If I hit enter, or click on the path link, I get a DOS prompt screen appearing momentarily but I can not see what is printed before it disappears.
Can anybody help with the above?
Also can anybody advise which is the best site for beginners to learn Python?
If I type 6*2 & enter into Python prompt the answer 12 appears, so Python is working.
But Im having difficulty opening my first Python project.
In my text editor, UltraEdit, I have created files & copied & pasted 2 simple text editor scripts & cant get either to open.
The most simple one provides a short script that starts with the screen only. I cant even get that to open. That coding is as follows;
import sys v=sys.python_version if "2.7" in v: from Tkinter import * elif "3.3" in v or "3.4" in v or "3.8.1" in v: # I added the 3.8.1 from tkinter import * root=Tk("Text Editor") root.mainloop()The Tutorial states - If you are on Windows, search and open Command prompt, type
python /pathto/texteditor.py - I changed that to - python /pythonprojects/texteditor.py
and hit enter. You should see a screen that looks like the picture above. (Header & Footer)
When I paste python /pythonprojects/texteditor.py into the Command prompt a window appears showing the path & the words "Run command" below, and below further
Open
Run as Administrator
Open file location
If I hit enter, or click on the path link, I get a DOS prompt screen appearing momentarily but I can not see what is printed before it disappears.
Can anybody help with the above?
Also can anybody advise which is the best site for beginners to learn Python?