-
Notifications
You must be signed in to change notification settings - Fork 113
Conversation
76b7146
to
d008cf9
Compare
For non-NetHack ttyrecs, the "\033[26;0f" doesn't work very well as it can jump "up", not down. But there's no good way to do this for all situations.
d008cf9
to
8fcddb3
Compare
Also support -1 flag for classic ttyrecs.
As the comment says, could also only start rendering from the last CLRSCREEN before FLAGS.start, which would be potentially faster. The logic to do that requires introducing a few extra modes and does not seem worth it at this point. The logic here is subtle enough as it is.
data = chr(char).encode("ascii", "backslashreplace") | ||
arrow = "->" | ||
|
||
data = str(data)[2:-1] # Strip b' and ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably better to use a more 'proper' way of doing this that doesnt depend on how Python decides to represent a converted bytes to string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree! But what is the proper way of doing exactly that? It's not data.encode("ascii", "backslashreplace")
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StackOverflow seems to suggest doing what we are doing here ... https://stackoverflow.com/questions/54889234/how-to-decode-a-string-representation-of-a-bytes-object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im just testing it out and will add some screen shots to the PR |
No description provided.