Then run permissions on the script file,
Method (1) chmod +x./*.py method
(2) chmod 755./*.py (777 don't matter)
This command does not adjust, will appear permission denied error terminal directly executed.
If a comment similar to the following has been given at the beginning of the script content:
#!/usr/bin/env python (or #!/usr/bin/python)
#!/usr/bin/python3
Then you can run it directly in the terminal:./*.py
If this comment is not
Do it in the terminal:
Python./*.py (Note: Some Linux versions run even though the comments above are written with Python in front of Python as a command.) Otherwise direct./*.py This file is not a command and will appear./*.py not found error. That this command cannot be found, for granted)
If it's a script with a graphical interface
After the previous chmod, simply double-click Execute to
The terminal executes the py file directly and does not require a python command