Hi Richard,<br><br>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.<br><br>Best,<br><br>rod<br><br>--error--<br><br>D:>socktest.py<br>Traceback (most recent call last):<br> File "D:\Eigene Dateien\PresenceAgent\socktest.py", line 4, in <module><br> import stacklesssocket<br> File "D:\Eigene Dateien\PresenceAgent\stacklesssocket.py", line 35, in <module><br> for k, v in stdsocket.__dict__.iteritems():<br>RuntimeError: dictionary changed size during iteration<br><br><br><br>--- code--<br><br>import os<br>import sys<br>import stackless<br>import stacklesssocket<br>sys.modules["socket"] = stacklesssocket<br> <br>if
__name__=="__main__":<br> print "doing nothing other than import libraries"<br><br><b><i>Richard Tew <richard.m.tew@gmail.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> On 4/2/07, Rod <userprogoogle-139@yahoo.co.uk> wrote:<br>> Firstly thanks for your help on this. However I am still experiecing<br>> problems when importing stacklesssocket. Basically I can import it without<br>> an error when I do so from the Python shell, howerver when I import it as a<br>> script I try to execute it refuses to work. I have attached the basics of<br>> the script code below, it bombs out whenever I try to import, even if<br>> similar code or an "import stacklesssocket as socket" line is used.<br><br>You need to import it without the try/except, have it error and then<br>copy paste the error to the mailing list. Without seeing the error,<br>it is impossible to see
what is going wrong.<br><br>Richard.<br></userprogoogle-139@yahoo.co.uk></blockquote><br>