Comments (7)
Cool, we'll wait for someone to volunteer to implement it. Note that it should be implemented without adding dependencies, so if we're using e.g. colorama
, we'll need to copy-paste some of their code.
from pysnooper.
P.S. Wouldn't it be possible to have something like like
pip install pysnooper[colorama]
which would be optional dependency or something like that? And then user can specify inpysnooper.conf
if to use colorama or native shell escapes?
It would be possible, but it means that for the rest of PySnooper's life I will have to confirm that these two branches work with each new release. The less moving parts, the less maintenace work I have to do.
from pysnooper.
If I remember correctly, the reason I didn't implement this when I implemented the same feature for Linux is that there are multiple shells you can run in Windows. (CMD, MSYS bash, Powershell, whatever Windows 10 has going on for running Linux.) I may have tried a solution on a couple of these and got inconsistent results. So figuring out a solution that works for all of these (or at least degrades gracefully) is the main difficulty here.
from pysnooper.
The biggest priority in this feature is that whatever happens, we don't want to send an output with ugly shell escapes to a shell that won't interpret them correctly. That's the main disaster I'm trying to prevent.
from pysnooper.
Just found out about PySnooper and it's a lovely library. I'm on Windows (Windows Terminal) and it's a shape it doesn't have colors.
If you want to have some compatibility between shells, what about additional library like colorama
or something like that?
Second idea is to have colors.conf
and let the user specify possible changes?
from pysnooper.
Thank you. My second message in this thread answers part of your message. In any case, if you want to implement this, go ahead.
from pysnooper.
Oh I apologize. I've skimmed through from 1st to 3rd and 4th message.
I see the code where you specify the colors. Will try to experiment a little bit. It's not my strong topic thought :-)
Anyway, have a great day.
P.S. Wouldn't it be possible to have something like like pip install pysnooper[colorama]
which would be optional dependency or something like that? And then user can specify in pysnooper.conf
if to use colorama or native shell escapes?
from pysnooper.
Related Issues (20)
- pypi has 1.0.0 has there is no tag in the repo HOT 3
- bug: python3.9/site-packages/pysnooper/tracer.py", line 263, in simple_wrapper HOT 2
- Output to logging HOT 1
- Snoop recursively, but only in my code. HOT 2
- print value of a claas var HOT 1
- SOURCE IS UNAVAILABLE HOT 8
- Feature request: python -m pysnooper user_script.py HOT 3
- Compatibility issue with Debugger in Visual Studio Code HOT 2
- Print("come") HOT 1
- compatiblity with python 3.12 HOT 7
- No variable output from the last line HOT 3
- Can not install it in Kaggle platform HOT 1
- `return` event line missing when exception occurred HOT 9
- new features request/discussion HOT 2
- Add Callback HOT 1
- Fix the CI HOT 4
- Deactivate all snooping except explicitly specified "watch"es HOT 3
- snoop entire file or program HOT 3
- Evaluate using `sys.monitoring` to make PySnooper faster
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysnooper.