5
I want to run a simple Python code I created from anywhere on my system.
I know to do this with a shell script just turn the command ln -s /home/user/script.sh /usb/bin/script, but would like to know how to do the same with a "code.py".
5
I want to run a simple Python code I created from anywhere on my system.
I know to do this with a shell script just turn the command ln -s /home/user/script.sh /usb/bin/script, but would like to know how to do the same with a "code.py".
4
It’s the same:
ln -s /home/usuario/codigo.py /usb/bin/script
Browser other questions tagged python linux
You are not signed in. Login or sign up in order to post.
Actually, it’s the same command. The error I was encountering when calling my code was because I didn’t set the correct interpreter. In my case, the problem was solved by adding "#! /usr/bin/python2" at the beginning of the code. Thanks for the help.
– Douglas Cordeiro