[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndexNG/converters - __init__.py:1.1.2.3

Andreas Jung andreas@digicool.com
Tue, 26 Feb 2002 18:57:07 -0500


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndexNG/converters
In directory cvs.zope.org:/tmp/cvs-serv23550

Modified Files:
      Tag: ajung-textindexng-branch
	__init__.py 
Log Message:
minor fixes to work with Zope


=== Zope/lib/python/Products/PluginIndexes/TextIndexNG/converters/__init__.py 1.1.2.2 => 1.1.2.3 ===
 
-import os
-import imp
+import os, sys, imp
 
 _converters = {}
 
+oldpath = sys.path
 oldcwd = os.getcwd()
 dirname = os.path.dirname(__file__)
 os.chdir(dirname)
 converters = os.listdir('.')
 converters = filter(lambda x: x.endswith('.py') and x!='__init__.py', converters)
 
+sys.path.append(os.getcwd())
+
+
 for cv in converters:
 
     cv = cv[:-3]
@@ -22,7 +25,7 @@
     finally:
         fp.close()
 
-
+sys.path = oldpath
 os.chdir(oldcwd)
 
 def getConverter(key):