[AG-DEV] porblem with python 2.5
Eric Olson
eolson at mcs.anl.gov
Mon Dec 3 11:59:14 CST 2007
Hi Eddy,
The name of the threadedselectreactor has changed to _threadedselect in
newer versions of twisted. The code below should try to use either
name. Can you try replacing the code you pasted with this:
try:
from twisted.internet import _threadedselect as threadedselectreactor
except:
from twisted.internet import threadedselectreactor
try:
threadedselectreactor.install()
except:
pass
from twisted.internet import reactor
If you still get errors, let me know.
Just for reference, I had to look this up in the examples I wrote for
the shared app tutorial at last years AG retreat:
Sample code: http://www.mcs.anl.gov/~eolson/DeveloperTutorials1.zip
web page here: http://www.accessgrid.org/developer/sharedapps
Eric
Eddy Johel Diaz Murcia wrote:
> Hi everyone, I'm trying to create an Shared application in Fedora core
> 7 with python 2.5 and AG 3.0.2
>
> When I try to start my app this error appears
>
> Traceback (most recent call last):
> File
> "/workspace/AccessGridDEV/aplicacion/AGTK-3/AGTK-SharedACMG/src/SharedACMG.py",
> line 204, in <module>
> frame = SharedACMG(None, -1,"Shared ACMG", appUrl, venueUrl,
> connectionId)
> File
> "/workspace/AccessGridDEV/aplicacion/AGTK-3/AGTK-SharedACMG/src/SharedACMG.py",
> line 56, in __init__
> reactor.interleave(wx.CallAfter)
> AttributeError: 'SelectReactor' object has no attribute 'interleave'
>
>
> The code
>
> try:
> from twisted.internet import threadedselectreactor
> threadedselectreactor.install()
> except:
> pass
> from twisted.internet import reactor
>
> reactor.interleave(wx.CallAfter)
>
>
> The reactor.py file
>
> # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
> # See LICENSE for details.
>
> """
> See twisted.internet.interfaces.IReactor*.
> """
> import sys
> del sys.modules['twisted.internet.reactor']
> #from twisted.python import log
> #log.msg("Installing SelectReactor, since unspecified.")
> from twisted.internet import selectreactor
> selectreactor.install()
>
>
> Could anybody help me.
>
> Thanks in advance.
>
>
>
>
More information about the ag-dev
mailing list