This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Aivar.Annamaa, BreamoreBoy, Marcus.Smith, Saimadhav.Heblikar, dstufft, markroseman, ncoghlan, paul.moore, peter.otten, rhettinger, steve.dower, terry.reedy
Date 2016-01-13.09:01:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452675712.9.0.403345139225.issue23551@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-01-13 09:01:53terry.reedysetrecipients: + terry.reedy, rhettinger, paul.moore, ncoghlan, peter.otten, markroseman, BreamoreBoy, Aivar.Annamaa, steve.dower, dstufft, Marcus.Smith, Saimadhav.Heblikar
2016-01-13 09:01:52terry.reedysetmessageid: <1452675712.9.0.403345139225.issue23551@psf.upfronthosting.co.za>
2016-01-13 09:01:52terry.reedylinkissue23551 messages
2016-01-13 09:01:51terry.reedycreate