anthonyalmarza / chalk

Light-weight python package for terminal output in color
MIT License
67 stars 3 forks source link

chalk.stderr causes AttributeError in Python 3 #11

Open jMyles opened 9 years ago

jMyles commented 9 years ago
  File "/home/justin/git/hendrix/hendrix/ux.py", line 238, in main
    chalk.red(msg % (str(e), action), pipe=chalk.stderr)
builtins.AttributeError: 'module' object has no attribute 'stderr'
cgmcintyr commented 9 years ago

Hmm, it seems like this was broken when from sys import stderr was removed in commit https://github.com/anthonyalmarza/chalk/commit/3df108fd3c3107d2b64936b38f177b74a7caa907. One solution would be to import stderr into hendrix/ux.py and then change the code to

    chalk.red(msg % (str(e), action), pipe=stderr)