Re: [Tutor] Trouble with encoding/decoding a file

2012-02-06 Thread ALAN GAULD
the  whole file!   Alan Gauld Author of the Learn To Program website http://www.alan-g.me.uk/ > > From: Tony Pelletier >To: Alan Gauld >Cc: tutor@python.org >Sent: Monday, 6 February 2012, 18:40 >Subject: Re: [Tutor] Trouble with encoding/decodi

Re: [Tutor] Trouble with encoding/decoding a file

2012-02-06 Thread Tony Pelletier
On Mon, Feb 6, 2012 at 1:13 PM, Alan Gauld wrote: > On 06/02/12 15:11, Tony Pelletier wrote: > >> Hi, >> >> I've been tasked with getting the encoded value using a SOAP call and >> then writing the file out. I first used the interpreter to do so like >> such: >> >> import base64 >> >> encoded = '

Re: [Tutor] Trouble with encoding/decoding a file

2012-02-06 Thread Alan Gauld
On 06/02/12 15:11, Tony Pelletier wrote: Hi, I've been tasked with getting the encoded value using a SOAP call and then writing the file out. I first used the interpreter to do so like such: import base64 encoded = 'super long encoded string' data = base64.b64decode(encoded) outfile = open('t

[Tutor] Trouble with encoding/decoding a file

2012-02-06 Thread Tony Pelletier
Hi, I've been tasked with getting the encoded value using a SOAP call and then writing the file out. I first used the interpreter to do so like such: import base64 encoded = 'super long encoded string' data = base64.b64decode(encoded) outfile = open('test.xls', 'w') outfile.write(data) outfile.