Simply a global object that act as undefined.
Project description
There
Print the current filename and line.
Example, where.py
import there
import there as here
print(here)
print('and')
print(there)
Then python where.py will print:
where.py:4 and where.py:6
replace print function
There provide a replacement for the print function, that prepend the filename and line.
Example, where.py
from there import print
print('hi')
print('there')
Then python where.py will print:
where.py:3 hi where.py:4 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.
Gotchas
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file there-0.0.6-py2.py3-none-any.whl
.
File metadata
- Download URL: there-0.0.6-py2.py3-none-any.whl
- Upload date:
- Size: 54.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49e932322da9fbe013487473133553732da98be5647620f7c0cee3c8031b6ec9 |
|
MD5 | 39ab6488b24fdc462911a6d1c6768846 |
|
BLAKE2b-256 | 539400e7970f559bc00ef639e0eeae134f59f7603ecf5e776481a1a548a82f9c |