[Stackless] web.py

Richard Tew richard.m.tew at gmail.com
Thu Jun 21 10:22:58 CEST 2007


On 6/21/07, Richard Tew <richard.m.tew at gmail.com> wrote:
> On 6/21/07, Matt Provost <mprovost at termcap.net> wrote:
> > Has anyone gotten stackless to work with web.py? I'm trying to port some
> > CGIs over but it either segfaults or just hangs. Monkeypatching
> > stacklesssocket was causing problems but I think I fixed that (you have
> > to add:
> > fromfd = stdsocket.fromfd
> > getfqdn = stdsocket.getfqdn
> > to stacklesssocket).
>
> Ah, yes.  Will try and remember to add those, thanks.

Are you sure you are using the latest version of stacklesssocket.py?
It takes all the exported attributes from the normal socket module and
imports them.

if "__all__" in stdsocket.__dict__:
    __all__ = stdsocket.__dict__
    for k, v in stdsocket.__dict__.iteritems():
        if k in __all__:
            globals()[k] = v

In 2.5.1 on Windows I get the following in any case:

Python 2.5.1 Stackless 3.1b3 060516 (release25-maint:55039:55048, May
1 2007, 14:13:4) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import stacklesssocket as ss
>>> ss.fromfd
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'fromfd'
>>> "fromfd" in ss.__all__
False
>>>

Maybe I am doing something wrong?

Cheers,
Richard.

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



More information about the Stackless mailing list