GitXplorerGitXplorer
C

there

public
12 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
b906f70f13b9dff4162c9465d57e9f28c0430102

try to fix some mypy stuff

CCarreau committed 2 years ago
Unverified
19073eb5fe8672996187a29b4ab1f7cff7dc209c

bump version

CCarreau committed 2 years ago
Verified
393d6e9a69950a4282037b9640a54c49d24817cb

Merge pull request #2 from sohang3112/patch-1

CCarreau committed 2 years ago
Verified
2ef01d36362426f989f97165819655fba1f4950c

Correct Windows Platform Detection

ssohang3112 committed 2 years ago
Unverified
e747ee4d67ced8a3f9abba1a54b9497e087c3946

bump version number

CCarreau committed 2 years ago
Unverified
b7d3bb96ac26c008b8eaf79cf1bdc298ec825bbc

add types

CCarreau committed 3 years ago

README

The README file for this repository.

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.