Update of /cvsroot/pywin32/pywin32/com/win32comext/axscript/server
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24942/com/win32comext/axscript/server
Modified Files:
axsite.py
Log Message:
Misc cleanups (remove unused string module, dict upgrades, etc)
Index: axsite.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/server/axsite.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** axsite.py 27 Nov 2008 09:42:42 -0000 1.3
--- axsite.py 27 Nov 2008 11:10:04 -0000 1.4
***************
*** 1,3 ****
- import string
import win32com.axscript.axscript
import winerror
--- 1,2 ----
***************
*** 44,48 ****
def SetScriptState(self, state):
self.eScript.SetScriptState(state)
!
IActiveScriptSite_methods = [
'GetLCID',
--- 43,47 ----
def SetScriptState(self, state):
self.eScript.SetScriptState(state)
!
IActiveScriptSite_methods = [
'GetLCID',
***************
*** 64,77 ****
def __init__(self, objModel={}, engine = None, lcid=0):
self.lcid = lcid
-
self.objModel = { }
- for name, object in objModel.items():
- # Gregs code did string.lower this - I think that is callers job if he wants!
- self.objModel[name] = object
-
self.engine = None
if engine:
self._AddEngine(engine)
!
def AddEngine(self, engine):
"""Adds a new engine to the site.
--- 63,71 ----
def __init__(self, objModel={}, engine = None, lcid=0):
self.lcid = lcid
self.objModel = { }
self.engine = None
if engine:
self._AddEngine(engine)
!
def AddEngine(self, engine):
"""Adds a new engine to the site.
***************
*** 84,88 ****
self.engine = newEngine
flags = axscript.SCRIPTITEM_ISVISIBLE | axscript.SCRIPTITEM_NOCODE | axscript.SCRIPTITEM_GLOBALMEMBERS | axscript.SCRIPTITEM_ISPERSISTENT
! for name in self.objModel.keys():
newEngine.AddNamedItem(name, flags)
newEngine.SetScriptState(axscript.SCRIPTSTATE_INITIALIZED)
--- 78,82 ----
self.engine = newEngine
flags = axscript.SCRIPTITEM_ISVISIBLE | axscript.SCRIPTITEM_NOCODE | axscript.SCRIPTITEM_GLOBALMEMBERS | axscript.SCRIPTITEM_ISPERSISTENT
! for name in self.objModel.iterkeys():
newEngine.AddNamedItem(name, flags)
newEngine.SetScriptState(axscript.SCRIPTSTATE_INITIALIZED)
***************
*** 100,104 ****
def GetItemInfo(self, name, returnMask):
- # name = string.lower(name)
if name not in self.objModel:
raise exception.Exception(scode=winerror.TYPE_E_ELEMENTNOTFOUND, desc='item not found')
--- 94,97 ----
|