I'm new her and I was wondering if it is possible to download custom modules from the web?
Forum Archive
Downloading modules from the internet?
Yes, you can use stash for that. In most cases you can use its pip command to install a module from PyPI automatically. If that doesn't work or the module is not on PyPI, you can download it manually with wget, unpack it with tar or unzip, and move the correct folder to site-packages by hand.
Awesome! Thanks for your help 😊
Does anyone know how i can download urllib.request?
@dorien_jansen just import urllib. urllib.request is part of the standard library.
That is a module from the Python 3 standard library. Pythonista currently uses Python 2, where you'd use urllib2. If you're trying to run a script that imports urllib.request, then it's written for Python 3 and can't run on the current Pythonista. (A Python 3 version of Pythonista is currently in beta, though as far as I know it won't be released for a while.)
Thanks for the info, I'll wait for the final release
try: # Python 3 and later
from urllib.request import urlopen
except ImportError: # Python 2
from urllib2 import urlopen
also, using the Pip command in Stash you can install from github repos using pip install UserName/ProjectName