How to create ASCII animation in a console application using Python 3.x?

前端 未结 5 751
有刺的猬
有刺的猬 2020-12-08 18:01

I would like to port this question to Python (Windows + Linux + Mac Os)

How to create ASCII animation in Windows Console application using C#?

Thank you!

5条回答
  •  春和景丽
    2020-12-08 18:30

    Well, I managed to port Philip Daubmeier's solution to python 3 (and also added color mapping to it). The main problem was the ord-function, which needed to be left out, as Python 3 - bytestring indexing returns the ASCII-value directly, instead of the char at that position (see here and here..). I created a Git repo, feel free to contribute (better performance would be desirable-> pm for invitation):

    repo: https://github.com/sebibek/gif2ascii

提交回复
热议问题