[Stackless] Sockets

Rod userprogoogle-139 at yahoo.co.uk
Mon Apr 2 18:13:53 CEST 2007


Hi Richard,

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.

FYI I am using Python 2.5 along with Stackless 3.1b3 on an Intel/XP box.

If anyone can help I would be much obliged.

Best,

rod

import os
import sys
import stackless

try:
    import stacklesssocket
    sys.modules["socket"] = stacklesssocket
except:
    print "Error importing Stackless socket"
    
if __name__=="__main__":
    print "doing nothing other than importing libraries"

Richard Tew <richard.m.tew at gmail.com> wrote: On 3/29/07, Rod  wrote:
> I am new to the Stackless way of things but overall so far so good. However
> I am trying to write a programme which uses sockets and so far have had no
> luck. I keep receiving errors. Also I have tried running the mud.py example
> which is no the wiki and again I receive errors, a copy of which I have put
> below. I am using Python 2.4 and stackess 3.1b3 - Win XP. I have also
> downloaded the stacklesssocket library and have been using that. Any advice
> on using sockets will be gratefully received as I am at a loss to know why
> my old sockets model (which worked fine without stackless), which I ported
> to Stackless no longer works. Also is there any particular reason why no
> sockets code I try (even from stackless.com) works?

The stacklesssocket module is only tested with Python 2.5, it may need
some compatibility changes to work with Python 2.4.  Anything you use
whether existing examples or your own code will fail until this is done.

Hope that helps,
Richard.

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20070402/79551682/attachment.htm>
-------------- next part --------------
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless


More information about the Stackless mailing list