[Chicago] sockets Question

Carl Karsten carl at personnelware.com
Fri Dec 26 19:08:29 CET 2008


"just cast it to char*" is just a form of serializing.  (I am pretty sure it is 
a poor form, but that's debatable.)

 >>> help(pickle)
     pickle - Create portable serialized representations of Python objects.

http://doc.python.org/lib/module-pickle.html
"The pickle module can transform a complex object into a byte stream and it can 
transform the byte stream into an object with the same internal structure. 
Perhaps the most obvious thing to do with these byte streams is to write them 
onto a file, but it is also conceivable to send them across a network or store 
them in a database."

Carl K


Daniel Griffin wrote:
> C is the one true language. Python sockets are really easy to use and
> everything, but due to the way python works you have to pass everything as a
> string, which makes sending things like datetime's a pain. In C you just
> cast it to char* and then cast it back on the other end.
> 
> Dan
> 
> 
> 
> On Fri, Dec 26, 2008 at 11:11 AM, Pete <pfein at pobox.com> wrote:
> 
>> On Dec 26, 2008, at 11:31 AM, Massimo Di Pierro wrote:
>>
>>> On Dec 26, 2008, at 10:24 AM, Pete wrote:
>>>
>>>  When I look at C, I can see the Python within.
>>> Actually it is Python that calls Posix inside and exposes similar APIs ;-)
>>>
>> Yeah, they read Knuth so I don't have to.
>>
>> I never learned C. ;-)
>>
>> --Pete
>>
>> PS- I think that's quoteboard worthy, no?
>>
>> _______________________________________________
>> Chicago mailing list
>> Chicago at python.org
>> http://mail.python.org/mailman/listinfo/chicago
>>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago


More information about the Chicago mailing list