[Stackless] Fwd: deepcopying (pickling) channels

lars van Gemerden lars at rational-it.com
Tue Oct 22 20:00:04 CEST 2013


I had another (maybe related) pickling problem, which i have taken up with
Wing (because it does not happen in e.g. Idle):

-----------------------------------------------
import pickle

class Test(object):
    def __init__(self):
        self.func = self.func2
    def func2(self):
        print "something"

if __name__ == '__main__':

    t = Test()
    t.func()
    s = pickle.dumps(t)
    print s
-----------------------------------------------

with error:

pickle.PicklingError: Can't pickle <built-in function wingdb_import_hook>:
it's not found as tdbgtracer27stackless.wingdb_import_hook



On Tue, Oct 22, 2013 at 9:32 AM, lars van Gemerden <lars at rational-it.com>wrote:

> Thanks,
>
> I'll to get back to that, i am trying to get a demo up and running ...
>
> Cheers, Lars
>
>
> On Mon, Oct 14, 2013 at 9:04 PM, Richard Tew <richard.m.tew at gmail.com>wrote:
>
>> If you use the stackless socket module, it can make blocking functions
>> like network access stackless compatible.  That means they block the
>> tasklet rather than the thread, and you don't necessarily need to call
>> schedule.
>>
>> stacklesslib provides monkey patching for the socket module and a
>> range of others.
>>
>> It might help you out.
>>
>> This is a very old example from when the stackless socket module was
>> standalone:
>>
>>
>> https://mail.python.org/pipermail/python-announce-list/2006-September/005252.html
>>
>> Nowadays you'd want to obtain stacklesslib and import that rather than
>> stacklesssocket.
>>
>> Richard.
>>
>> _______________________________________________
>> Stackless mailing list
>> Stackless at stackless.com
>> http://www.stackless.com/mailman/listinfo/stackless
>>
>
>
>
> --
> ====================================
> Lars van Gemerden
> lars at rational-it.com
> +31 6 26 88 55 39
> ====================================
>



-- 
====================================
Lars van Gemerden
lars at rational-it.com
+31 6 26 88 55 39
====================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20131022/73edcef0/attachment.html>


More information about the Stackless mailing list