Message258135
On python-list, Chris Angelico reported 2 other problems when running something like "import pip; pip.main(['install','psycopg2'])" from IDLE. Both can be worked around in a pipgui program.
1. pip displays a progress bar by sending to stdout a sequence of strings something like '#', '\r##', '\r###', ..., '\r###...###'. When IDLE sends these on to the tk text widget, they are displayed as above. '\r' displays as '\r' and does not cause a 'return'.
pipgui would already be monitoring and parsing pip output to display information in appropriate widgets, so it could look for and interpret whatever pip actually does send.
2. pip has a bug. When installing a non-wheel, it may unconditionally execute "s.decode(sys.__stdout__.encoding)". sys.__stdin__, etcetera, are documented as sometimes being None, https://docs.python.org/3/library/sys.html#sys.__stdin__, and None does not have an 'encoding' attribute. The workaround, until this is fixed, is for pipgui to rebind sys.__stdout__ to an object that at least has a sensible .encoding. I would grep the entire pip source other '__std.*__' uses to see if more is needed. |
|
Date |
User |
Action |
Args |
2016-01-13 09:01:53 | terry.reedy | set | recipients:
+ terry.reedy, rhettinger, paul.moore, ncoghlan, peter.otten, markroseman, BreamoreBoy, Aivar.Annamaa, steve.dower, dstufft, Marcus.Smith, Saimadhav.Heblikar |
2016-01-13 09:01:52 | terry.reedy | set | messageid: <1452675712.9.0.403345139225.issue23551@psf.upfronthosting.co.za> |
2016-01-13 09:01:52 | terry.reedy | link | issue23551 messages |
2016-01-13 09:01:51 | terry.reedy | create | |
|