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

ANSI escape character sequences are printed in Windows cmd.exe when outputting to stderr #17

Open
lpinner opened this issue Jul 10, 2017 · 4 comments
Labels

Comments

@lpinner
Copy link

lpinner commented Jul 10, 2017

I'm stuck using Windows :(for work).

The ANSI escape character sequences are printed in Windows cmd.exe when outputting to stderr.

#test.py
import daiquiri
daiquiri.setup()
logger = daiquiri.getLogger()
logger.error("something went wrong")

test
I can workaround using colorama (the library that IPython uses).

#test_colour.py
import colorama 
colorama.init()

import daiquiri
daiquiri.setup()
logger = daiquiri.getLogger()
logger.error("something went wrong")

test_colour

Colours also work when script is run using ipython as colorama is being used automatically (i.e. ipython test.py).

Is there a way to tell daiquiri not to output colour escape chars?
Even better ; ), would you consider using colorama as an optional extra?

@jd
Copy link
Member

jd commented Jul 10, 2017

Oh we should definitely switch to colorama. @blakev maybe you should take a look into that for https://github.com/jd/daiquiri/pull/9 ?

@jd jd added the bug label Jul 10, 2017
@blakev
Copy link
Contributor

blakev commented Jul 10, 2017

For sure, if you're not against adding the dependency.

@jd
Copy link
Member

jd commented Jul 10, 2017

No, all good for me. Worst thing we could make it optional, but well. It's a common use case.

@eli-b
Copy link

eli-b commented Aug 24, 2017

Once colorama is used, you can document that Windows is supported in setup.cfg.

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

No branches or pull requests

4 participants