Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Downloading modules from the internet?
-
I'm new her and I was wondering if it is possible to download custom modules from the web?
-
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 withwget
, unpack it withtar
orunzip
, and move the correct folder tosite-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 importsurllib.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