Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASCII-art emulator #15

Merged
merged 6 commits into from Apr 15, 2017
Merged

ASCII-art emulator #15

merged 6 commits into from Apr 15, 2017

Conversation

rm-hull
Copy link
Owner

@rm-hull rm-hull commented Apr 14, 2017

No description provided.

import string
import curses
import collections
try:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be avoided, we use py27 and newer.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you be more specific?
Not sure what you're referring to with 'this'

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the import workaround. simply from io import StringIO is enough, isn't it?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not exactly sure, but in py2, I think:

  • StringIO.StringIO is byte oriented and works with sys.stdout/stderr
  • io.StringIO is unicode oriented and doesn't work with sys.stdout/stderr

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test would show the difference.

cleanup method is called.

Loosely based on https://github.com/ajalt/pyasciigen/blob/master/asciigen.py
"""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add 'since' version nr.

@rm-hull rm-hull merged commit 14147ed into master Apr 15, 2017
@rm-hull rm-hull deleted the asciiart branch April 15, 2017 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants