Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Make python script executable in WSL Ubuntu 18.04

Writer Andrew Henderson

maybe you can help me with my problem... I'm trying to make a python script executable on Ubuntu 18.04 in WSL. I created a folder where my python scripts are saved /home/<user>/Python_scripts. Second, I try to link the folder using the file .pythonrc

#.pythonrc file
import sys
import os
sys.path.append('/home/<user>/Python_scripts/')
print ('Scripts loaded')
#end .pythonrc file

Third, i add to my .bashrc the next line in order to relate .pythonrc file:

export PYTHONSTARTUP=$HOME/.pythonrc

Finally source .bashrcBut the scripts are never loaded, i can't find the scripts executable.

Thanks you in advance.

3 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy