Can I Run Python From Notepad?
PYM files contain macros written in the Python scripting language.
Programmers use the Python programming language to develop applications for use in Web and desktop environments. Python facilitates this through its extensive collection of libraries and the flexibility of the language and its interpreter. While a programmer can enter Python programming in any text editor, such as Notepad, actually executing a Python script occurs by invoking the interpreter in some fashion. By using Notepad and the Python interpreter, a programmer can write Python programs and execute them, or create "batch" files that can execute multiple programs, including Python scripts.
The Python print command is simple, but right now it is just text. For the operating system to understand that the file should be read as a Python program, the programmer needs to save the file as a Python file, with the ".py" extension. In Notepad, just save the file, in this "hello" example, with the ".py" extension, as in "hello.py."
Note that the Python interpreter must be included in the user's PATH variable to function from the command line. How to set the interpreter in the PATH differs between Windows systems. The user should check the documentation for his particular version of Windows if he needs to set Python in his PATH.
Windows will then execute the Python command, because it is listed as the only element in the list of commands to execute.
Jackson, G.S.. "Can I Run Python From Notepad?" Small Business - Chron.com, http://smallbusiness.chron.com/can-run-python-notepad-26639.html. Accessed 18 April 2019.