Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1525

Show
Ignore:
Timestamp:
12/11/06 17:04:47
Author:
fumanchu
Message:

2.x fix for #609 (Support for IronPython? 1.0).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/cherrypy-2.x/cherrypy/lib/cptools.py

    r1523 r1525  
    350350 
    351351# public domain "unrepr" implementation, found on the web and then improved. 
    352 import compiler 
    353352 
    354353def getObj(s): 
     354    try: 
     355        import compiler 
     356    except ImportError: 
     357        # Fallback to eval when compiler package is not available, 
     358        # e.g. IronPython 1.0. 
     359        return eval(s) 
     360     
    355361    s = "a=" + s 
    356362    p = compiler.parse(s) 

Hosted by WebFaction

Log in as guest/cpguest to create tickets