Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #21369
| From | Benjamin Peterson <benjamin@python.org> |
|---|---|
| Subject | Re: sys.stdout.detach() results in ValueError |
| Date | 2012-03-08 03:49 +0000 |
| References | <alpine.DEB.2.00.1203072032590.2657@pebbe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.500.1331178585.3037.python-list@python.org> (permalink) |
Peter Kleiweg <pkleiweg <at> xs4all.nl> writes: > Not yet using fp in any way, this script gives the following error: > > Exception ValueError: 'underlying buffer has been detached' in You're probably using print() or some such which tries to write to sys.stdout. It's safest to just write to sys.stdout.buffer rather than using detach.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
sys.stdout.detach() results in ValueError Peter Kleiweg <pkleiweg@xs4all.nl> - 2012-03-07 20:41 +0100
Re: sys.stdout.detach() results in ValueError Dave Angel <d@davea.name> - 2012-03-07 17:14 -0500
Re: sys.stdout.detach() results in ValueError Peter Kleiweg <pkleiweg@xs4all.nl> - 2012-03-07 23:35 +0100
Re: sys.stdout.detach() results in ValueError Terry Reedy <tjreedy@udel.edu> - 2012-03-07 19:10 -0500
Re: sys.stdout.detach() results in ValueError Mark Tolonen <metolone@gmail.com> - 2012-03-07 16:41 -0800
Re: sys.stdout.detach() results in ValueError Benjamin Peterson <benjamin@python.org> - 2012-03-08 03:49 +0000
csiph-web