[Python-checkins] CVS: python/dist/src/Lib/xml/sax __init__.py,1.8,1.9

Guido van Rossum python-dev@python.org
Fri, 22 Sep 2000 02:30:32 -0700


Update of /cvsroot/python/python/dist/src/Lib/xml/sax
In directory slayer.i.sourceforge.net:/tmp/cvs-serv11153

Modified Files:
	__init__.py 
Log Message:
More whitespace cleanup, to satisfy tabnanny.py.  Don't trust -tt!


Index: __init__.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xml/sax/__init__.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** __init__.py	2000/09/22 05:07:56	1.8
--- __init__.py	2000/09/22 09:30:29	1.9
***************
*** 81,87 ****
  if sys.platform[ : 4] == "java":
      def _create_parser(parser_name):
!     	from org.python.core import imp
!     	drv_module = imp.importName(parser_name, 0, globals())
!     	return drv_module.create_parser()
  
  else:
--- 81,87 ----
  if sys.platform[ : 4] == "java":
      def _create_parser(parser_name):
!         from org.python.core import imp
!         drv_module = imp.importName(parser_name, 0, globals())
!         return drv_module.create_parser()
  
  else:
***************
*** 89,113 ****
  
      def _rec_find_module(module):
!     	"Improvement over imp.find_module which finds submodules."
!     	path=""
!     	for mod in string.split(module,"."):
              if path == "":
!             	info = (mod,) + _imp.find_module(mod)
              else:
!             	info = (mod,) + _imp.find_module(mod, [path])
!             	
              lastmod = _imp.load_module(*info)
  
              try:
!             	path = lastmod.__path__[0]
              except AttributeError, e:
!             	pass
  
!     	return info
  
      def _create_parser(parser_name):
!     	info = _rec_find_module(parser_name)
!     	drv_module = _imp.load_module(*info)
!     	return drv_module.create_parser()
  
  del sys
--- 89,113 ----
  
      def _rec_find_module(module):
!         "Improvement over imp.find_module which finds submodules."
!         path=""
!         for mod in string.split(module,"."):
              if path == "":
!                 info = (mod,) + _imp.find_module(mod)
              else:
!                 info = (mod,) + _imp.find_module(mod, [path])
!                 
              lastmod = _imp.load_module(*info)
  
              try:
!                 path = lastmod.__path__[0]
              except AttributeError, e:
!                 pass
  
!         return info
  
      def _create_parser(parser_name):
!         info = _rec_find_module(parser_name)
!         drv_module = _imp.load_module(*info)
!         return drv_module.create_parser()
  
  del sys