import distutils.version

try:
    import greenlet
    getcurrent = greenlet.greenlet.getcurrent
    GreenletExit = greenlet.greenlet.GreenletExit
    preserves_excinfo = (distutils.version.LooseVersion(greenlet.__version__)
                         >= distutils.version.LooseVersion('0.3.2'))
    greenlet = greenlet.greenlet
except ImportError as e:
    raise
    try:
        from py.magic import greenlet
        getcurrent = greenlet.getcurrent
        GreenletExit = greenlet.GreenletExit
        preserves_excinfo = False
    except ImportError:
        try:
            from stackless import greenlet
            getcurrent = greenlet.getcurrent
            GreenletExit = greenlet.GreenletExit
            preserves_excinfo = False
        except ImportError:
            try:
                from support.stacklesss import greenlet, getcurrent, GreenletExit
                preserves_excinfo = False
                (greenlet, getcurrent, GreenletExit)  # silence pyflakes
            except ImportError as e:
                raise ImportError("Unable to find an implementation of greenlet.")

@@ -19,25 +19,16 @@
 ersion%0A%0A
-try:%0A    
 import g
@@ -35,20 +35,16 @@
 reenlet%0A
-    
 getcurre
@@ -77,20 +77,16 @@
 current%0A
-    
 Greenlet
@@ -123,20 +123,16 @@
 letExit%0A
-    
 preserve
@@ -218,20 +218,16 @@
         
-    
 %3E= distu
@@ -262,20 +262,16 @@
 .3.2'))%0A
-    
 greenlet
@@ -295,780 +295,4 @@
 let%0A
-except ImportError as e:%0A    raise%0A    try:%0A        from py.magic import greenlet%0A        getcurrent = greenlet.getcurrent%0A        GreenletExit = greenlet.GreenletExit%0A        preserves_excinfo = False%0A    except ImportError:%0A        try:%0A            from stackless import greenlet%0A            getcurrent = greenlet.getcurrent%0A            GreenletExit = greenlet.GreenletExit%0A            preserves_excinfo = False%0A        except ImportError:%0A            try:%0A                from support.stacklesss import greenlet, getcurrent, GreenletExit%0A                preserves_excinfo = False%0A                (greenlet, getcurrent, GreenletExit)  # silence pyflakes%0A            except ImportError as e:%0A                raise ImportError(%22Unable to find an implementation of greenlet.%22)%0A

Remove dead import code