Coder Social home page Coder Social logo

Comments (7)

cool-RR avatar cool-RR commented on June 10, 2024 1

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.

cool-RR avatar cool-RR commented on June 10, 2024 1

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?

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.

cool-RR avatar cool-RR commented on June 10, 2024

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.

cool-RR avatar cool-RR commented on June 10, 2024

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.

SonGokussj4 avatar SonGokussj4 commented on June 10, 2024

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.

cool-RR avatar cool-RR commented on June 10, 2024

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.

SonGokussj4 avatar SonGokussj4 commented on June 10, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.