From Windows command line:
set PYTHONPATH=%PYTHONPATH%;C:\My_python_lib
To set the PYTHONPATH permanently, add the line to your autoexec.bat
. Alternatively, if you edit the system variable through the System Properties, it will also be changed permanently.
Recommended Posts
zaqi 1
Hi @Harry Plotter,
I can figure it out! thank you so much for your help! will upload the video soon
Best,
Zaqi
Link to post
Share on other sites
Smithy 1,145
It an older topic, but in case someone don't want to use Python 3, it is really easy to "port" it to Python 2. There are only 4 lines to change and it runs well with Python 2.x.
Here is a diff of the changes:
7,8c7
Edited by Smithy< from six.moves import urllib
---
> from urllib.request import urlopen
76c75
< response = urllib.request.urlopen(imgurl)
---
> response = urlopen(imgurl)
78c77
< f = open(filename,'wb')
---
> f = open(filename,'bw')
81c80
< print("Print progress: %s Image: %05i\r" % (progress(), count))
---
> print("Print progress: %s Image: %05i" % (progress(), count), end='\r')
Typo
Link to post
Share on other sites