python-script
In Depth Tutorial for Understanding Why Python runs version 2.7 and Python3 runs 3.x
- Download the python-script folder to a directory of your choice (i.e Desktop, Downloads, Documents etc) Navigate to that directory using the cd command
cd
- Check that the first line in the python program starts with the shebang (which is the definition for this "#!") stating the path to python3 :
#!/usr/bin/env python3
Or you can use the local path depending on what you are doing #!/usr/local/bin/python3
- To enable permission to execute the file we will use chmod which stands for change mode. Chmod is commonly used to make a file executable, readable, or writable. For more information about chmod check this site: check this site We will use the command 755 which makes the file executable, readable, and writable by the user.
chmod 755 test.py
then chmod 755 test_two.py
- Run the scripts with
./test.py
then run the second script with ./test_two.py