Re: marshall type but builds stringobj??

Lance Ellinghouse (lance@markv.com)
Fri, 15 Jan 93 15:15:06 PST

In-Reply-To: Your message of "Fri, 15 Jan 1993 11:45:06 MET."
<9301151145.aa24928@hermix.markv.com>
From: Guido.van.Rossum@cwi.nl
X-Organization: CWI, Kruislaan 413, 1098 SJ Amsterdam, The Netherlands
X-Phone: +31 20 5924127 (work), +31 20 6225521 (home), +31 20 5924199 (fax)
Date: Fri, 15 Jan 1993 22:59:46 +0100
Sender: Guido.van.Rossum@cwi.nl
Status: R

Guido:
>Lance Ellinghouse:
>>Has anyone put together a 'marshall' type module that instead
>>of dumping everything to a file, it would create a stringobj that
>>contained the information???
>>
>>I would like to be able to create a stringobj that contains the same
>>information as when you do a marshal.dump()... This will allow me
>>to send PYTHON objects across networks! :)
> You can already send Python objects as strings across networks using
> repr() or `` and eval(), but you're right that marshal would be more
> efficient. (Though not more general -- the same objects for which
> eval(`x`) fails also cannot be load()ed by marshal.)

This may be true, but You cannot send the following easily using repr()
or `` or eval():

(0,'This is a test',func)

Where func is a code object that should be sent and executed on the
remote machine (where 'func' did NOT exist on the remote machine).

> This has been asked so many times now that I think I'll try to do
> something about it...

Great!

Lance Ellinghouse
lance@markv.com