Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F11221682
elementtree.py
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
762 B
Subscribers
None
elementtree.py
View Options
"""elementtree.py
Use this module to get the best ElementTree implementation
Usage:
>>> from professor.tools.elementtree import ET
"""
from
professor.tools.config
import
Config
as
_C
_logger
=
_C
()
.
getLogger
()
# try to load faster but non-standard cElementTree module
try
:
import
xml.etree.cElementTree
as
ET
except
ImportError
:
_logger
.
info
(
"Could not load module xml.etree.cElementTree,"
" so we're on a python < 2.5 system."
" Trying to load cElementTree..."
)
try
:
import
cElementTree
as
ET
except
ImportError
:
_logger
.
warn
(
"Could not load module cElementTree: "
"using slower xml.etree.ElementTree instead!"
)
import
xml.etree.ElementTree
as
ET
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, May 14, 10:46 AM (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5108501
Default Alt Text
elementtree.py (762 B)
Attached To
rPROFESSORSVN professorsvn
Event Timeline
Log In to Comment