mameau redbubble image
Get Shirty!Keep us online, Buy some kit.

pyANS update – Python ANSIart scroller

I’ve had another look at pyANS this morning after getting it up and running in a centOS VM. In doing so I have learnt a few things.

  • The script itself is only good for Python 2.7+ so I have now added a check for that prior to running.
  • The escape code [2J (\2J) I was using to clear the console was the reason the ANSI would not reset properly between renders and therefore the reason for the continued corruption once the first ANSI set the console mode. I have now changed that to the reset escape code [033c (\033c) which at least in testing (under centOS) appears so far to have corrected the issues.
  • There was an exception thrown reading some of the ANSI, not exactly sure which yet but I have added a try/except in place to capture and report on it if debugging is turned on.

Script is working a lot better now than it was in the initial commit; which now that many people seem keen to build up displays makes me feel a little better around releasing code.

This post refers specifically to the pyANS commit id 893cf0a9eb976fde3a6a81dbcc6a5ea9d2e75916 which it seems inherited my centOS test machine username instead of the set in the config … thanks for that, you learn something new every day!

The project is on for those who check the site. I’ve also entered it in the Adafruit Pi Zero Contest because there is no reason this project couldn’t be run from a Zero as well.

Would like to get my hands on a Zero to try it with.

I have also uploaded some additional videos to YouTube of the testing performed with the changes. Results are quite promising, videos are included below.

References for pyANS update

One Comment
Show Buttons
Hide Buttons