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

Share code with urwid #37

Open
thomasballinger opened this issue Sep 4, 2014 · 3 comments
Open

Share code with urwid #37

thomasballinger opened this issue Sep 4, 2014 · 3 comments

Comments

@thomasballinger
Copy link
Member

I bet there's a bunch of code we should be sharing in this area, like color names, settings and "default" terminal attributes, see http://urwid.org/reference/attrspec.html and http://urwid.org/manual/displayattributes.html#display-attributes

-@wardi

Most sensible way to do this is probably making urwid a dependency of curtsies - it's not a painful dependency at all. Presumably this doesn't mean we should remove blessings, just add urwid.

Things we could do:

  • have a fmtstr rendering method that uses urwid things (could also do this with blessings)
  • ?
@thomasballinger
Copy link
Member Author

We shouldn't do this if it's limiting - just if it means less code to maintain. Also check out @gwk's stuff: https://github.com/gwk/gloss/blob/master/python/gloss/io/sgr.py - if it's more elegant or powerful we don't want to limit ourselves. For this issue, we should take stock of everything adding an urwid dependency would simplify.

@wardi
Copy link

wardi commented Sep 4, 2014

I'd also be happy to separate out the low-level terminal handling parts of urwid into another package that urwid and any other package could use. urwid is an easy dependency because it doesn't require anything else, but it is kind of large :-)

It's nicer if we can settle on one way of doing the sort of thing that urwid's AttrSpec so we can share code without adding layers for converting things back and forth.

@thomasballinger
Copy link
Member Author

This looks less likely: I'm planning to make FmtStr be closer to Blessed formatted strings. However this should still be checked out, I'm not sure how colored strings are going to work.

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

No branches or pull requests

2 participants