Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Allow a function to discover the module or script name of its caller, or its caller's caller.

Project Description

stackclimber allows your function to find the module or script name of its caller, or of its caller’s caller.

from stackclimber import stackclimber


assert stackclimber() == __name__
assert stackclimber() == stackclimber(0)

With no arguments, it finds the current function’s module name. With 1, it finds that of its caller; with 2, that of its caller’s caller, and so forth.

This functionality can be used to implement “automatic” imports that use some information about the module into which they are being imported by overriding a module’s __getattr__.

Release History

Release History

This version
History Node

0.99

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
stackclimber-0.99.tar.gz (1.9 kB) Copy SHA256 Checksum SHA256 Source May 19, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting