Forum Archive

Versions of Pythonista "extra" modules

ccc

http://omz-software.com/pythonista/docs/ios/index.html lists several pypi modules that are included in Pythonista.

Are there other undocumented modules in the current Pythonista (like bottle)???

I was interested to see how much these modules had changed since the last release of Pythonista (Nov. 2013). I was surprised to see that all modules that had a __version__ variable had newer version in pypi than in Pythonista. Surely, many of these updates are minor but it is interesting just the same that they had all been updated in 6 months time.

In the list below is the __version__ string of the module in Pythonista vs. the version on https://pypi.python.org . ????? indicates that the Pythonista module does not have a __version__ variable.

import importlib

modules = ('bottle bs4 dropbox evernote feedparser markdown markdown2 paramiko PIL requests xmltodict')
for module_name in modules.split():
    current_module = importlib.import_module(module_name)
    module_version = '?' * 5
    try:     module_version = current_module.__version__
    except:  module_version = '?' * 5
    print ('{:<10} {}'.format(module_name, module_version))
print('=' * 16)
bottle     0.11.4 vs. 0.12.5
bs4        4.1.3  vs. 4.3.2
dropbox    ?????  vs. 2.0.0
evernote   ?????  vs. 1.25.0
feedparser 5.1.2  vs. 5.1.3
markdown   ?????  vs. 2.4
markdown2  2.1.0  vs. 2.2.1
paramiko   1.7.7.1 (George) vs. 1.13.0
PIL        ?????  vs. 1.1.6 vs. Pillow 2.3.1
requests   1.2.2  vs. 2.2.1
xmltodict  0.6.0  vs. 0.8.6
ccc

Thanks to omz for the hint on importlib.import_module() below.

omz

You can import modules by name (as string) with importlib.import_module, e.g.:

import importlib
markdown2 = importlib.import_module('markdown2')