anthonyalmarza / chalk Goto Github PK
View Code? Open in Web Editor NEWLight-weight python package for terminal output in color
License: MIT License
Light-weight python package for terminal output in color
License: MIT License
It would be nice to have a chalk.bold, else without specifying the color.
There are too many new lines for each emitted record.
It looks like chalk misses an opportunity write something without inserting new line.
This is something very useful when you want something like colored check signs in a list of items.
Let's have an agreement on how exactly this can be parametrized and I can push a pull request.
Running 2to3 over the code I only found 2 lines of code which needed to be refactored to make the codebase python 3 compatible (see https://github.com/chrsintyre/chalk). Is there something more complicated I'm not seeing?
File "/home/justin/git/hendrix/hendrix/ux.py", line 238, in main
chalk.red(msg % (str(e), action), pipe=chalk.stderr)
builtins.AttributeError: 'module' object has no attribute 'stderr'
def test():
logger.info()
logger.debug()
logger.error()
All of the above would print blue
For ease of use, and API similarity with the chalk.js sybling,
the chalk
methods should return a formated string, not printing it as an output.
This would also solve #8 and enable to have multicolor strings
Hi. It's a bit pity that this module uses not a very searchable name convenient only for the ones using JS with Node.
So I haven't discovered this module several years ago. So I have created an own one https://gitlab.com/KOLANICH/RichConsole . It should process the nested stuff more correctly than this one. And it has a bit different API.
But there can be only one, so I suggest to cooperate and merge our source codes into a single module.
Since chalk uses the logging module, do we run the risk of blocking during the log emission?
As I understand it, only File I/O is done concurrently by default.
I find using \n\r
is kind of inappropriate for all OSes since on POSIX, \n
is and should be all you need.
So, maybe it's better to use os.linesep
. I could submit a pull request, but the order is different, os.linesep
is \r\n
not the same order in current code, not sure if there would be side-effect, if I just use it.
If you want, I could still open a PR.
Is there a way to use new colors using RGB ?
For example, I would like to use grey, how can I do it with pychalk ?
Thanks !
Either needs to call str or repr
I'm trying to install this library with poetry
and I'm getting this error:
AttributeError: 'PathDistribution' object has no attribute '_normalized_name'
I'm running Python 3.10.5 and pychalk
2.0.1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.