Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Print current file and line number

Project description


Print the current filename and line.


import there
import there as here


Then python will print:

replace print function

There provide a replacement for the print function, that prepend the filename and line.


from there import print


Then python will print: hi there

that's it

That's it (for now), non more, no less. I have plan – the usually never get realised – to also have a there.indent that return the indentation of the current line.


Returns the line where the __str__, or __repr__ of there is computed. Usually by print. So it might be wrong. If you want to be sure (like when using log) wrap it in str()

Runs only on CPython likely. But anyway don't run it in production.

Project details

Download files

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

Files for there, version 0.0.9
Filename, size File type Python version Upload date Hashes
Filename, size there-0.0.9-py2.py3-none-any.whl (4.8 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size there-0.0.9.tar.gz (42.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page