Reputation: 41
i install python and gevent on my mac, but when i try to use
s = StreamServer(xx,xx)
s.pre_start()
it gets error:'StreamServer' object has no attribute 'pre_start'?
the version information of python and gevent: Python 2.7.5 Gevent 1.0.1
Upvotes: 0
Views: 304
Reputation: 11
pre_start method has been rename to init_socket see in: https://github.com/gevent/gevent/blob/cec56a6a3d8ba8968f6ff5ef969a5775e4f10e8b/changelog.rst#release-10b1-jan-10-2012
Upvotes: 1
Reputation: 43334
In the source code for server.py, where StreamServer is implemented, you can see that it inherits from BaseServer.
BaseServer itself is implemented in baseserver.py
A quick look at these two files reveals that neither StreamServer nor BaseServer has an attribute pre_start
, that is why you get an error when you try to call .pre_start()
on a variable of type StreamServer
.
I do not know what it is you're trying to accomplish, but you're gonna have to do it another way.
Upvotes: 0