changeset 13:99619772e57c

Move imports. emeraldtree/ElementTree.py: Move re and sys import. PEP8 compilance.
author Bastian Blank <bblank@thinkmo.de>
date Sat, 31 May 2008 16:28:41 +0200
parents 1eb02b658530
children 3d7555e0be1b
files emeraldtree/ElementTree.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/emeraldtree/ElementTree.py	Sat May 31 16:25:04 2008 +0200
+++ b/emeraldtree/ElementTree.py	Sat May 31 16:28:41 2008 +0200
@@ -121,8 +121,6 @@
 # structure, and convert it from and to XML.
 ##
 
-import sys, re
-
 class _SimpleElementPath(object):
     # emulate pre-1.2 find/findtext/findall behaviour
     def find(self, element, tag):
@@ -972,6 +970,7 @@
 #     invalid.
 
 def register_namespace(prefix, uri):
+    import re
     if re.match("ns\d+$", prefix):
         raise ValueError("Prefix format reserved for internal use")
     for k, v in _namespace_map.items():
@@ -1098,6 +1097,7 @@
 
 def dump(elem):
     # debugging
+    import sys
     if not isinstance(elem, ElementTree):
         elem = ElementTree(elem)
     elem.write(sys.stdout)