Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add output coloring, option to disable #1

Closed
cool-RR opened this issue Apr 21, 2019 · 17 comments
Closed

Feature request: Add output coloring, option to disable #1

cool-RR opened this issue Apr 21, 2019 · 17 comments

Comments

@cool-RR
Copy link
Owner

cool-RR commented Apr 21, 2019

No description provided.

@LeetaoGoooo
Copy link

Hey, i'd like to work on this one,any good advice for me?

@cool-RR
Copy link
Owner Author

cool-RR commented Apr 24, 2019 via email

@LeetaoGoooo
Copy link

I hava already fix this one,you can see my last commit #1, but got no idea about how to test color. would you mind giving me some help,thx~

@cool-RR
Copy link
Owner Author

cool-RR commented Apr 25, 2019

Great, can you submit a pull request to this repo? I tried making sense of your code but couldn't separate your commits from mine on your repo.

@LeetaoGoooo
Copy link

i made the pr~~O(∩_∩)O

@cool-RR cool-RR changed the title Add output coloring, option to disable Feature request: Add output coloring, option to disable Apr 27, 2019
@cool-RR
Copy link
Owner Author

cool-RR commented Apr 27, 2019

This PR is up for grabs again. It's a good one, I hope someone takes it.

@Mark-Jung
Copy link

I'll give it a shot.

@AtHeartEngineer
Copy link

What about doing this with pycolorama? @Mark-Jung lemme know if you want help, definitely looking forward to this PR.

@Mark-Jung
Copy link

I haven't looked into this yet, but I will asap. Have been swamped with work this week.

@alexmojaki
Copy link
Collaborator

Before jumping into a PR with colorama you should be aware that there is a reluctance here to use any dependencies, see #48 and #68

@cool-RR
Copy link
Owner Author

cool-RR commented May 3, 2019

@AtHeartEngineer : Alex is correct, I prefer to avoid dependencies for this project.

@AtHeartEngineer
Copy link

@AtHeartEngineer : Alex is correct, I prefer to avoid dependencies for this project.

Definitely understand that. It could be an optional dependency, if you want color. Just a thought, figured colorama did a lot of the cross-compatibility work.

@alexmojaki
Copy link
Collaborator

It could be an optional dependency, if you want color

I know @cool-RR is not interested in maintaining optional dependencies either, I tried that too in #71

I tried to make this project extensible in #103 so that another project could be built on top of it with extra features through dependencies, but that's been rejected. I'd already written some code using Pygments which added syntax highlighting in the terminal.

@cool-RR
Copy link
Owner Author

cool-RR commented Jun 10, 2019

Anyone reading this: This feature is up for grabs for anyone interested in implementing it.

@alexmojaki
Copy link
Collaborator

My version of PySnooper is out and it is colorful! I'd love to hear people's thoughts about the design and use of color here.

It seems that colorama is not needed for Windows support after all, which is good because it only supports a few colors anyway. Windows 10 has had support for ANSI codes in cmd for two years now, you just have to enable it: https://stackoverflow.com/a/36760881/2482744 That's what I'm doing. I don't know what happens in other terminals, I'm not a Windows user.

So PySnooper can still accomplish this without dependencies. If you want syntax highlighting, maybe check what https://github.com/Qix-/better-exceptions is doing for ideas.

@skjerns
Copy link

skjerns commented Dec 7, 2022

It would be great to have color coding under windows as well!

colorama supports windows, as I have just tested and confirmed, so implementing it in the same way would be possible :)

@cool-RR
Copy link
Owner Author

cool-RR commented Dec 7, 2022

Oh, I forgot to close this issue when i implemented this functionality. I'm closing it now.

@skjerns can you please open a separate issue for implementing this functionality on Windows? And link these two issues to each other.

if you'll be interested in working on it, then you should know two things: 1. I'll want it done with no dependencies, so if you use anything from Colorama, you'll have to copy-paste some code. And 2. If you'll be interested in implementing, I'll try to figure out what was the original reason I didn't implement on Windows.

Let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants