Openning Python program

Dennis Lee Bieber wlfraed at ix.netcom.com
Sun Feb 6 10:48:42 EST 2022


On Sun, 6 Feb 2022 13:44:07 +0530, "createkmontalbion at gmail.com"
<createkmontalbion at gmail.com> declaimed the following:

>   I cannot open python after downloading it keeps going to modify/uninstall
>   ?? please help
>

	Stop clicking on the INSTALLER. What you downloaded is just the program
that installs and configures Python on your system. Stuff it away someplace
safe should you need to modify the current installation, but otherwise just
forget that it exists.

	Python is a command line interpreter -- not an IDE. Open a command
shell and see if it finds Python:

Microsoft Windows [Version 10.0.19041.1415]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Wulfraed>python
Python ActivePython 3.8.2 (ActiveState Software Inc.) based on
 on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

NOTE: there may be a "launcher" installed that is supposed to find Python
without requiring one to edit the system PATH environment variable -- but I
tend to avoid it: M$ and some other applications seem to keep hijacking
which Python gets priority, and it often invokes anything but the version I
want. [If on installs Visual Studio and doesn't read carefully, it will
install its version of Python and the R statistics system] (Though it
appears that today is a good day...)

C:\Users\Wulfraed>py
Python ActivePython 3.8.2 (ActiveState Software Inc.) based on
 on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

	Pick your preferred programming text editor, write some script, and run
it from the command line

C:\Users\Wulfraed>type junk.py

print("Let me out of here!")

C:\Users\Wulfraed>python junk.py
Let me out of here!

C:\Users\Wulfraed>junk.py
Let me out of here!

C:\Users\Wulfraed>junk
Let me out of here!

C:\Users\Wulfraed>python junk
python: can't open file 'junk': [Errno 2] No such file or directory

C:\Users\Wulfraed>

NOTE: I have Windows configured to accept .py as an executable file, with
the Python interpreter as the "runner", which is how the lines without
"python" function -- but if you explicitly invoke python with a file name
you must provide the full name.

C:\Users\Wulfraed>assoc .py
.py=Python.File

C:\Users\Wulfraed>ftype python.file
python.file="C:\Python38\python.exe" "%1" %*


-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
	wlfraed at ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/


More information about the Python-list mailing list