Changeset 3205 for TI01-discovery


Ignore:
Timestamp:
11/01/08 19:49:42 (12 years ago)
Author:
selatham
Message:

make celementree imports more robust

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/trunk/ingestAutomation/OAIBatch/SpaceTimeIngestFromMOLES.py

    r2508 r3205  
    11#!/usr/bin/env python 
    2 import cElementTree 
    3 import elementtree.ElementTree as etree 
     2try: #python 2.5 
     3    from xml.etree import cElementTree 
     4    from xml.etree import ElementTree as etree 
     5except ImportError: 
     6    try: 
     7        # if you've installed it yourself it comes this way 
     8        import cElementTree 
     9        import ElementTree as etree 
     10    except ImportError: 
     11        # if you've egged it this is the way it comes 
     12        from ndgUtils.elementtree import cElementTree 
     13        from ndgUtils.elementtree import ElementTree as etree 
     14 
    415import molesReadWrite as MRW 
    516import sys 
Note: See TracChangeset for help on using the changeset viewer.