Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Making modules callable, for not very good reasons.

Project description

No more from <module> import <Module>!

Wouldn’t be nice if…

>>> import pprint
>>> pprint("hello")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'module' object is not callable

Was possible? Well:

  1. Add special sauce:

    >>> import calldules
    
  2. Import module(s), call:

    >>> import pprint
    >>> pprint("hello")
    
  3. ????

    'hello'
    
  4. PROFIT!!!

Also works with such modules as flask, codecs, array, datetime, decimal, random, and many more!

No responsibility is taken for any grievous harm caused either by irresponsible or responsible use of calldules.

Inspired by Richard Jones’ talk Don’t Do This.

Project details


Release history Release notifications

This version
History Node

1.0.1

History Node

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
calldules-1.0.1.tar.gz (3.0 kB) Copy SHA256 hash SHA256 Source None Feb 23, 2014
calldules-1.0.1.zip (5.6 kB) Copy SHA256 hash SHA256 Source None Feb 23, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page