Haha,

well, this is something for WingWare. Or you can work around it.

When certain things happen, like pickling, the Wind IDE needs to
return the original objects, by either releasing its hooks, or
by pretending they do. No idea how difficult that is.

Maybe you can special-case this, walk the frames tree of the tasklet to pickle
and construct a fake one that has references to the hooked things unwrapped.

Well, that's not me ;-)


On 22.10.13 20:00, lars van Gemerden wrote:
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 <[email protected] <mailto:[email protected]>> 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
    <[email protected] <mailto:[email protected]>> 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
        [email protected] <mailto:[email protected]>
        http://www.stackless.com/mailman/listinfo/stackless




-- ====================================
    Lars van Gemerden
    [email protected] <mailto:[email protected]>
    +31 6 26 88 55 39 <tel:%2B31%206%2026%2088%2055%2039>
    ====================================




--
====================================
Lars van Gemerden
[email protected] <mailto:[email protected]>
+31 6 26 88 55 39
====================================


_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless


--
Christian Tismer             :^)   <mailto:[email protected]>
Software Consulting          :     Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121     :    *Starship* http://starship.python.net/
14482 Potsdam                :     PGP key -> http://pgp.uni-mainz.de
phone +49 173 24 18 776  fax +49 (30) 700143-0023
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/

_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to