Dominic Lüchinger
unread,Jun 20, 2013, 6:52:46 PM6/20/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ginkg...@googlegroups.com
Dear members
I've tried to install ginkgo and test a simple example but I failed.
This is what I tested
===============
Running Xubuntu 12.10
$mkdir project-folder/
$cd project-folder
$virtualenv .virtualenv --no-site-packages
$source .virtualenv/bin/activate
$python --version
# Python 2.7.4
$sudo apt-get install python-dev libevent-dev
$pip install gevent ginkgo
$cat << 'EOF' > quickstart.py
import logging
from ginkgo import Service
from ginkgo.async.gevent import StreamServer
logger = logging.getLogger(__name__)
class HelloWorldServer(Service):
def __init__(self):
self.add_service(StreamServer(('0.0.0.0', 7000), self.handle))
def handle(self, socket, address):
logger.debug("New connection {}".format(address))
while True:
socket.send("Hello World\n")
self.async.sleep(1)
EOF
$ginkgo quickstart.HelloWorldServer
## Second console
$nc localhost 7000
The problem at this point is, that no connection is handled. I expect receiving every second "Hello World". But netcat receives nothing. The connection between netcat and the server is somehow in a limbo state. If I quit the server, netcat realizes, that the connection is gone and exits.
Does someone see a thing that I'm doing wrong?
------------ pip list -----------
argparse (1.2.1)
distribute (0.6.34)
gevent (0.13.8)
Ginkgo (0.6.0dev)
greenlet (0.4.1)
wsgiref (0.1.2)
---------------------------------
Thank you for the help and kind regards
Dominic