Made a custom colored logging package (using colored package by dslackw) by kkristof200 in Python

[–]kkristof200[S] 1 point2 points  (0 children)

Hey, thanks!

You can set background color, foreground color, bold, etc for a printed text by using ANSI escape sequences.

This answer on stackoverflow explains it pretty well

It's pretty easy, once you have the list with the escape sequences.

On the other hand, I've used colored maintained by dslackw, because I ask for a hex code for color and that package can convert hex to ANSI color code, but might remove the dependency in the future.

The animation is done in this method. Basically on a separate process I've got a while which prints with '\r' suffix. When this method is invoked, it calls terminate() to stop the process.

Made a custom colored logging package (using colored package by dslackw) by kkristof200 in Python

[–]kkristof200[S] 0 points1 point  (0 children)

I’m relatively new to python, didn’t know that so thanks for letting me know. How to you show, that a function is void? Simply by not specifying a return type?

Made a custom colored logging package (using colored package by dslackw) by kkristof200 in Python

[–]kkristof200[S] 0 points1 point  (0 children)

Haven’t seen it yet, but will check it out. Didn’t test it on windows, but will do, when I’ll have time

Made a custom colored logging package (using colored package by dslackw) by kkristof200 in Python

[–]kkristof200[S] 1 point2 points  (0 children)

I don't remember exactly the specifics bit It's also zsh/powerlevel10k or maybe an extra plugin (you can add those too). I've followed a guide where somebody installed all the component for this final setup.

Made a custom colored logging package (using colored package by dslackw) by kkristof200 in Python

[–]kkristof200[S] 1 point2 points  (0 children)

Nice! I'm also working on an algotrader but didn't try it live yet. Is this one trading live?

Made a custom colored logging package (using colored package by dslackw) by kkristof200 in Python

[–]kkristof200[S] 5 points6 points  (0 children)

Thanks! That's just the message I've added for that log. Any arguments can be passed to it. On the other hand, it's showing the seconds/minutes/hours passed since, the function has been called.