Figure 3.1. Running a Python script from different operating systems. For most
computer systems it is commonplace to open a command-line interface and then type the
‘python’ command followed by the name, or file-system location, of the script, before
pressing the Return or Enter key. For Windows systems the PATH environment variable
will additionally need to be set up, as illustrated in
Figure 3.2
. In Windows Python scripts
are also often run by double-clicking on the file icon or by using the Run menu from the
IDLE editor (e.g. started via ‘Edit with IDLE’ in the right mouse menu for a Python file).
IDLE is often included as part of Python installations for Windows.
Do'stlaringiz bilan baham: |