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:&gt;socktest.py<br>Traceback (most recent call last):<br>&nbsp; File "D:\Eigene Dateien\PresenceAgent\socktest.py", line 4, in &lt;module&gt;<br>&nbsp;&nbsp;&nbsp; import stacklesssocket<br>&nbsp; File "D:\Eigene Dateien\PresenceAgent\stacklesssocket.py", line 35, in &lt;module&gt;<br>&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp; <br>if
 __name__=="__main__":<br>&nbsp;&nbsp;&nbsp; print "doing nothing other than import libraries"<br><br><b><i>Richard Tew &lt;richard.m.tew@gmail.com&gt;</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>&gt; Firstly thanks for your help on this. However I am still experiecing<br>&gt; problems when importing stacklesssocket. Basically I can import it without<br>&gt; an error when I do so from the Python shell, howerver when I import it as a<br>&gt; script I try to execute it refuses to work. I have attached the basics of<br>&gt; the script code below, it bombs out whenever I try to import, even if<br>&gt; 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>