[py-dev] greenlet problems!

Moe A imagefalling at gmail.com
Wed May 18 17:52:58 CEST 2005


i ran the distutils setup scripts for both Py and the separate one for
greenlets.  i copied and pasted the following example from
codespeak.net, but it segfaults after printing "hello world" ( "zsh:
segmentation fault (core dumped)  python green.py").  i'm running
FreeBSD 5.2.1.

from py.magic import greenlet

def test1(x, y):
    z = gr2.switch(x+y)
    print z

def test2(u):
    print u
    gr1.switch(42)

gr1 = greenlet(test1)
gr2 = greenlet(test2)
gr1.switch("hello", " world")



More information about the Pytest-dev mailing list