Pickle file and send via socket
lipska the kat
lipskathekat at yahoo.co.uk
Wed Aug 8 11:07:33 EDT 2012
On 08/08/12 14:50, S.B wrote:
> On Wednesday, August 8, 2012 3:48:43 PM UTC+3, lipska the kat wrote:
>> On 06/08/12 14:32, S.B wrote:
>>
[snip]
> Thank you so much !
> The examples are very helpful.
> What happens if I have a regular text file I want to send via the network.
> Do I need to read the file and then dump it into the "stargate" file object?
Well according to the documentation at
http://docs.python.org/py3k/tutorial/inputoutput.html#reading-and-writing-files
it should be straightforward to read and write pickled files
Not sure why you want to pickle a text file over the network when you
could just stream it between ports !
however ...
I'm currently getting a Unicode decode error on the first byte in the
stream when it gets to the other end, no idea why so I guess I have to
continue searching, read the documentation above and see if you can
figure it out, that's what I'm doing.
lipska
--
Lipska the Kat: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun
More information about the Python-list
mailing list