gevent

Attempting to use gevent library in Python: "ImportError: cannot import name core"

I'm attempting to use the gevent library in a Python app I'm writing. However, both easy_install and installing it manually appears to be failing. Any suggestions? Python 2.6.2 (r262:71600, Aug 5 2009, 10:31:21) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>...

Getting value of "i" from GEvent

Hello, I'm trying to add an event listener to each icon on the map when it's pressed. I'm storing the information in the database and the value that I'm wanting to retrive is "i" however when I output "i", I get it's last value which is 5 (there are 6 objects being drawn onto the map) Below is the code, what would be the best way to get...

How to make Django work with unsupported MySQL drivers such as gevent-mysql or Concurrence's MySQL driver?

I'm interested in running Django on an async framework like Concurrence or gevent. Both frameworks come with its own async MySQL driver. Problem is Django only officially supports MySQLdb. What do I need to do to make Django work with the MySQL drivers that come with gevent or Concurrence? Is there a step-by-step guide somewhere that ...

gevent install on x86_64 fails: "undefined symbol: evhttp_accept_socket"

I'm trying to install gevent on a fresh EC2 CentOS 5.3 64-bit system. Since the libevent version available in yum was too old for another package (beanstalkd) I compiled/installed libevent-1.4.13-stable manually using the following command: ./configure --prefix=/usr && make && make install This is the output from installing gevent: ...

SSL and WSGI apps - Python

Hi folks, I have a WSGI app that I would like to place behind SSL. My WSGI server is gevent. What would a good way to serve the app through SSL in this case be? ...

Eventlet or gevent or Stackless + Twisted, Pylons, Django and SQL Alchemy

We're using Twisted extensively for apps requiring a great deal of asynchronous io. There are some cases where stuff is cpu bound instead and for that we spawn a pool of processes to do the work and have a system for managing these across multiple servers as well - all done in Twisted. Works great. The problem is that it's hard to bring...

Capturing event of client disconnecting! - Gevent/Python

Hi folks, I'm using long polling for a chat with gevent. I'm using Event.wait() when waiting for new messages to be posted on the chat. I would like to handle the occasion a client disconnects with some functionality: e.g. Return "client has disconnected" as a message for other chat users Is this possible? =) ...

GEvent over kml

if I catch polygons in a kml with geoXml = new GGeoXml("http://gmaps-samples.googlecode.com/svn/trunk/ggeoxml/cta.kml"); how I can applicate listerners (onclick,overmouse,etc) over this polygons? ...

Reading data from memcache sometimes fails

I've written a gevent-based program that allows its web clients to quickly exchange messages through it (so it works like a hub). Since I only support polling mechanism at this moment, I've written it to store messages that need to be delivered to a specific client in its 'inbox' at the server side. While the client list is stored in My...

Is it safe to use SQLalchemy with gevent?

I know that some database drivers and other libraries providing connection to external services are incompatible with coroutine-based network libraries. However, I couldn't find out if SQLAlchemy can be safely used with such libraries (namely, gevent), and if any workarounds should be applied to exclude possible errors. Can you either t...

Python: unit testing socket-based code?

I'm writing a Python client+server that uses gevent.socket for communication. SAre there any good ways of testing the socket-level operation of the code (for example, verifying that SSL connections with an invalid certificate will be rejected)? Or is it simplest to just spawn a real server? Edit: I don't believe that "naive" mocking wil...

Using gevent with python xmlrpclib

Hello! Is it possible to use python's standard libs xmlrpclib with gevent? Currently i'm tried to use monkey.patch_all(), but without success. from gevent import monkey monkey.patch_all() import gevent import time import xmlrpclib from SimpleXMLRPCServer import SimpleXMLRPCServer import urllib2 def fetch(url): g = gevent.sp...