Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #46149

Re: This mail never gets delivered. Any ideas why?

Date 2013-05-27 10:28 +1000
From Cameron Simpson <cs@zip.com.au>
Subject Re: This mail never gets delivered. Any ideas why?
References <20130527002229.GA12740@cskk.homeip.net>
Newsgroups comp.lang.python
Message-ID <mailman.2225.1369614504.3114.python-list@python.org> (permalink)

Show all headers | View raw


On 27May2013 10:22, I wrote:
| | =>  903                         self.stdin.write(input)
[...]
| | self = <subprocess.Popen object>, self.stdin = <_io.BufferedWriter name=5>, self.stdin.write = <built-in method write of _io.BufferedWriter object>, input = 'kdsjfksdjkfjksdjfs\r\n\t'
| | TypeError: 'str' does not support the buffer interface 
| |       args = ("'str' does not support the buffer interface",) 
| |       with_traceback = <built-in method with_traceback of TypeError object>
| 
| This is symptomatic of sys.stdin (well, whatever you're writing to)
| being open in binary mode instead of text mode. And you're passing
| a str. Try passing std.encode().

Sorry, that should be "input.encode()".
-- 
Cameron Simpson <cs@zip.com.au>

PCs are like a submarine, it will work fine till you open Windows. - zollie101

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: This mail never gets delivered. Any ideas why? Cameron Simpson <cs@zip.com.au> - 2013-05-27 10:28 +1000
  Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-05-26 22:00 -0700
    Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-05-27 02:15 -0700
      Re: This mail never gets delivered. Any ideas why? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-05-27 12:44 +0100
    Re: This mail never gets delivered. Any ideas why? Νίκος Γκρ33κ <nikos.gr33k@gmail.com> - 2013-05-27 03:01 -0700

csiph-web