[Stackless] Sockets

Rod userprogoogle-139 at yahoo.co.uk
Tue Apr 3 14:05:31 CEST 2007

Hi Richard,

Thanks for your help. The error message is below, as is the revised code which is being run from within a DOS box. It should be noted that the same error does not arise when run from within IDLE. However I do need to try to make the actual programme script operate outwith IDLE it at all possible.




Traceback (most recent call last):
  File "D:\Eigene Dateien\PresenceAgent\socktest.py", line 4, in <module>
    import stacklesssocket
  File "D:\Eigene Dateien\PresenceAgent\stacklesssocket.py", line 35, in <module>
    for k, v in stdsocket.__dict__.iteritems():
RuntimeError: dictionary changed size during iteration

--- code--

import os
import sys
import stackless
import stacklesssocket
sys.modules["socket"] = stacklesssocket
if __name__=="__main__":
    print "doing nothing other than import libraries"

Richard Tew <richard.m.tew at gmail.com> wrote: On 4/2/07, Rod  wrote:
> Firstly thanks for your help on this. However I am still experiecing
> problems when importing stacklesssocket. Basically I can import it without
> an error when I do so from the Python shell, howerver when I import it as a
> script I try to execute it refuses to work. I have attached the basics of
> the script code below, it bombs out whenever I try to import, even if
> similar code or an "import stacklesssocket as socket" line is used.

You need to import it without the try/except, have it error and then
copy paste the error to the mailing list.  Without seeing the error,
it is impossible to see what is going wrong.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20070403/865ffa79/attachment.htm>
-------------- next part --------------
Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list