# Incompatibility with Python Curses Library

**URL:** <https://discourse.asciinema.org/t/incompatibility-with-python-curses-library/553>\
**Category:** Help\
**Created:** [October 11, 2021, 8:48pm UTC](https://discourse.asciinema.org/t/incompatibility-with-python-curses-library/553 "2021-10-11T20:48:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jkesmth](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@jkesmth](https://discourse.asciinema.org/u/jkesmth)\
**Post date:** [October 11, 2021, 8:48pm UTC](https://discourse.asciinema.org/t/incompatibility-with-python-curses-library/553/1 "2021-10-11T20:48:40Z")

</div>

Maybe it’s impossible to use asciinema to record a program that uses the Python Curses library, I suspect it is simply incompatible. Has anyone else tried this? I didn’t find any other topics about using Curses here.

What terminal display libraries are compatible with asciinema?

Here is a link to the recording I made where you can see the issues:  
[https://asciinema.org/a/SGjjrCtjx3mNTEm5tQWxmR0xR](https://asciinema.org/a/SGjjrCtjx3mNTEm5tQWxmR0xR)

---

<div class="post-metadata">

**Author:** ![ku1ik](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.asciinema.org/ku1ik/32/171_2.png) [@ku1ik](https://discourse.asciinema.org/u/ku1ik)\
**Post date:** [February 6, 2022, 3:23pm UTC](https://discourse.asciinema.org/t/incompatibility-with-python-curses-library/553/2 "2022-02-06T15:23:25Z")

</div>

Not sure if I see the issue. Can you describe the problem?

---

<div class="post-metadata">

**Author:** ![jkesmth](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@jkesmth](https://discourse.asciinema.org/u/jkesmth)\
**Post date:** [February 11, 2022, 12:06am UTC](https://discourse.asciinema.org/t/incompatibility-with-python-curses-library/553/3 "2022-02-11T00:06:55Z")

</div>

Hi, thanks for responding.

Did you watch the video? The lower half of the screen flickers constantly. This isn’t something the program does when I run it without asciinema.

I ended up writing some code to output frames without recording the terminal.

---

<div class="post-metadata">

**Author:** ![oskar-skog](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.asciinema.org/oskar-skog/32/389_2.png) [@oskar-skog](https://discourse.asciinema.org/u/oskar-skog)\
**Post date:** [July 21, 2022, 9:51pm UTC](https://discourse.asciinema.org/t/incompatibility-with-python-curses-library/553/5 "2022-07-21T21:51:13Z")

</div>

I’ve not had any problems with curses in Python and Asciinema.

Looking at the cast file I can see that it clears the entire screen and redraws every frame from scratch.  
This is likely to cause flicker.

You should use `stdscr.refresh()` instead of `stdscr.redrawwin()`

---

<div class="post-metadata">

**Author:** ![jkesmth](https://avatars.discourse-cdn.com/v4/letter/j/f9ae1b/32.png) [@jkesmth](https://discourse.asciinema.org/u/jkesmth)\
**Post date:** [July 24, 2022, 12:00am UTC](https://discourse.asciinema.org/t/incompatibility-with-python-curses-library/553/6 "2022-07-24T00:00:07Z")

</div>

Thanks for the reply.

The app runs smoothly with just curses. The “blank” isn’t noticeable normally, I thought it wouldn’t turn out like that because I assumed Asciinema would record the terminal as it is without applying any effects. I ended up just outputting each frame a different way which was easier.
