Ignore:
Timestamp:
20/06/07 08:07:57 (13 years ago)
Author:
domlowe
Message:

changing elementtree imports to handle python 2.5, 2.4 + eggs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/csml/parser_extra.py

    r2526 r2617  
    1010import csml.parser 
    1111import sys 
    12 import elementtree.ElementTree as etree 
     12try: #python 2.5 
     13    from xml.etree import ElementTree as etree 
     14except ImportError: 
     15    try: 
     16        # if you've installed it yourself it comes this way 
     17        import ElementTree as etree 
     18    except ImportError: 
     19        # if you've egged it this is the way it comes 
     20        from elementtree import ElementTree as etree 
    1321import string 
    1422import cElementTree as ET 
Note: See TracChangeset for help on using the changeset viewer.