<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Haha,<br>
      <br>
      well, this is something for WingWare. Or you can work around it.<br>
      <br>
      When certain things happen, like pickling, the Wind IDE needs to<br>
      return the original objects, by either releasing its hooks, or<br>
      by pretending they do. No idea how difficult that is.<br>
      <br>
      Maybe you can special-case this, walk the frames tree of the
      tasklet to pickle<br>
      and construct a fake one that has references to the hooked things
      unwrapped.<br>
      <br>
      Well, that's not me ;-)<br>
      <br>
      <br>
      On 22.10.13 20:00, lars van Gemerden wrote:<br>
    </div>
    <blockquote
cite="mid:CAP8kt8w4j1qk16MryN9DWUU=8evGAncYuBgfqsAK4DtEZdyxcg@mail.gmail.com"
      type="cite">
      <div dir="ltr">I had another (maybe related) pickling problem,
        which i have taken up with Wing (because it does not happen in
        e.g. Idle):
        <div><br>
        </div>
        <div>-----------------------------------------------<br>
          <div>
            <div>import pickle</div>
            <div><br>
            </div>
            <div>class Test(object):</div>
            <div>    def __init__(self):</div>
            <div>        self.func = self.func2</div>
            <div>    def func2(self):</div>
            <div>        print "something"</div>
            <div>        </div>
            <div>
              if __name__ == '__main__':</div>
            <div>    </div>
            <div>    t = Test()</div>
            <div>    t.func()</div>
            <div>    s = pickle.dumps(t)</div>
            <div>    print s</div>
          </div>
          <div>-----------------------------------------------<br>
          </div>
          <div><br>
          </div>
          <div>with error:</div>
          <div>
            <div><br>
            </div>
          </div>
          <div>
            <div>pickle.PicklingError: Can't pickle <built-in
              function wingdb_import_hook>: it's not found as
              tdbgtracer27stackless.wingdb_import_hook</div>
          </div>
          <div><br>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Tue, Oct 22, 2013 at 9:32 AM, lars
          van Gemerden <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:lars@rational-it.com" target="_blank">lars@rational-it.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Thanks,
              <div><br>
              </div>
              <div>I'll to get back to that, i am trying to get a demo
                up and running ...</div>
              <div><br>
              </div>
              <div>Cheers, Lars</div>
            </div>
            <div class="gmail_extra">
              <div>
                <div class="h5"><br>
                  <br>
                  <div class="gmail_quote">
                    On Mon, Oct 14, 2013 at 9:04 PM, Richard Tew <span
                      dir="ltr"><<a moz-do-not-send="true"
                        href="mailto:richard.m.tew@gmail.com"
                        target="_blank">richard.m.tew@gmail.com</a>></span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      If you use the stackless socket module, it can
                      make blocking functions<br>
                      like network access stackless compatible.  That
                      means they block the<br>
                      tasklet rather than the thread, and you don't
                      necessarily need to call<br>
                      schedule.<br>
                      <br>
                      stacklesslib provides monkey patching for the
                      socket module and a<br>
                      range of others.<br>
                      <br>
                      It might help you out.<br>
                      <br>
                      This is a very old example from when the stackless
                      socket module was standalone:<br>
                      <br>
                      <a moz-do-not-send="true"
href="https://mail.python.org/pipermail/python-announce-list/2006-September/005252.html"
                        target="_blank">https://mail.python.org/pipermail/python-announce-list/2006-September/005252.html</a><br>
                      <br>
                      Nowadays you'd want to obtain stacklesslib and
                      import that rather than<br>
                      stacklesssocket.<br>
                      <div>
                        <div><br>
                          Richard.<br>
                          <br>
_______________________________________________<br>
                          Stackless mailing list<br>
                          <a moz-do-not-send="true"
                            href="mailto:Stackless@stackless.com"
                            target="_blank">Stackless@stackless.com</a><br>
                          <a moz-do-not-send="true"
                            href="http://www.stackless.com/mailman/listinfo/stackless"
                            target="_blank">http://www.stackless.com/mailman/listinfo/stackless</a><br>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                  <br clear="all">
                  <div><br>
                  </div>
                </div>
              </div>
              <div class="im">-- <br>
                ====================================<br>
                Lars van Gemerden<br>
                <a moz-do-not-send="true"
                  href="mailto:lars@rational-it.com" target="_blank">lars@rational-it.com</a><br>
                <a moz-do-not-send="true"
                  href="tel:%2B31%206%2026%2088%2055%2039"
                  value="+31626885539" target="_blank">+31 6 26 88 55 39</a><br>
                ====================================
              </div>
            </div>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        ====================================<br>
        Lars van Gemerden<br>
        <a moz-do-not-send="true" href="mailto:lars@rational-it.com">lars@rational-it.com</a><br>
        +31 6 26 88 55 39<br>
        ====================================
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Stackless mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Stackless@stackless.com">Stackless@stackless.com</a>
<a class="moz-txt-link-freetext" href="http://www.stackless.com/mailman/listinfo/stackless">http://www.stackless.com/mailman/listinfo/stackless</a></pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Christian Tismer             :^)   <a class="moz-txt-link-rfc2396E" href="mailto:tismer@stackless.com"><mailto:tismer@stackless.com></a>
Software Consulting          :     Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121     :    *Starship* <a class="moz-txt-link-freetext" href="http://starship.python.net/">http://starship.python.net/</a>
14482 Potsdam                :     PGP key -> <a class="moz-txt-link-freetext" href="http://pgp.uni-mainz.de">http://pgp.uni-mainz.de</a>
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?   <a class="moz-txt-link-freetext" href="http://www.stackless.com/">http://www.stackless.com/</a></pre>
  </body>
</html>