Update of /cvsroot/pywin32/pywin32/com/win32com/demos
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20331/com/win32com/demos
Modified Files:
Tag: py3k
connect.py dump_clipboard.py eventsApartmentThreaded.py
eventsFreeThreaded.py excelAddin.py excelRTDServer.py
iebutton.py ietoolbar.py outlookAddin.py trybag.py
Log Message:
many more upgrades to py3k syntax
Index: ietoolbar.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/ietoolbar.py,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -C2 -d -r1.1.4.1 -r1.1.4.2
*** ietoolbar.py 1 Oct 2008 09:39:27 -0000 1.1.4.1
--- ietoolbar.py 26 Nov 2008 09:03:29 -0000 1.1.4.2
***************
*** 76,80 ****
def __setattr__(self, attr, val):
if not attr.startswith("_") and not self.__dict__.has_key(attr):
! raise AttributeError, attr
self.__dict__[attr] = val
--- 76,80 ----
def __setattr__(self, attr, val):
if not attr.startswith("_") and not self.__dict__.has_key(attr):
! raise AttributeError(attr)
self.__dict__[attr] = val
***************
*** 124,128 ****
def __call__(self,*args):
! print 'STUB: ',self.name,args
class IEToolbarCtrl:
--- 124,128 ----
def __call__(self,*args):
! print('STUB: ',self.name,args)
class IEToolbarCtrl:
***************
*** 178,182 ****
for method in self._public_methods_:
if not hasattr(self,method):
! print 'providing default stub for %s' % method
setattr(self,method,Stub(method))
--- 178,182 ----
for method in self._public_methods_:
if not hasattr(self,method):
! print('providing default stub for %s' % method)
setattr(self,method,Stub(method))
***************
*** 202,213 ****
def on_first_button(self):
! print "first!"
self.webbrowser.Navigate2('http://starship.python.net/crew/mhammond/')
def on_second_button(self):
! print "second!"
def on_third_button(self):
! print "third!"
def toolbar_command_handler(self,args):
--- 202,213 ----
def on_first_button(self):
! print("first!")
self.webbrowser.Navigate2('http://starship.python.net/crew/mhammond/')
def on_second_button(self):
! print("second!")
def on_third_button(self):
! print("third!")
def toolbar_command_handler(self,args):
***************
*** 283,293 ****
# register toolbar with IE
try:
! print "Trying to register Toolbar.\n"
hkey = _winreg.CreateKey( _winreg.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Internet Explorer\\Toolbar" )
subKey = _winreg.SetValueEx( hkey, comclass._reg_clsid_, 0, _winreg.REG_BINARY, "\0" )
except WindowsError:
! print "Couldn't set registry value.\nhkey: %d\tCLSID: %s\n" % ( hkey, comclass._reg_clsid_ )
else:
! print "Set registry value.\nhkey: %d\tCLSID: %s\n" % ( hkey, comclass._reg_clsid_ )
# TODO: implement reg settings for standard toolbar button
--- 283,293 ----
# register toolbar with IE
try:
! print("Trying to register Toolbar.\n")
hkey = _winreg.CreateKey( _winreg.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Internet Explorer\\Toolbar" )
subKey = _winreg.SetValueEx( hkey, comclass._reg_clsid_, 0, _winreg.REG_BINARY, "\0" )
except WindowsError:
! print("Couldn't set registry value.\nhkey: %d\tCLSID: %s\n" % ( hkey, comclass._reg_clsid_ ))
else:
! print("Set registry value.\nhkey: %d\tCLSID: %s\n" % ( hkey, comclass._reg_clsid_ ))
# TODO: implement reg settings for standard toolbar button
***************
*** 298,308 ****
# unregister toolbar from internet explorer
try:
! print "Trying to unregister Toolbar.\n"
hkey = _winreg.CreateKey( _winreg.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Internet Explorer\\Toolbar" )
_winreg.DeleteValue( hkey, comclass._reg_clsid_ )
except WindowsError:
! print "Couldn't delete registry value.\nhkey: %d\tCLSID: %s\n" % ( hkey, comclass._reg_clsid_ )
else:
! print "Deleting reg key succeeded.\n"
# entry point
--- 298,308 ----
# unregister toolbar from internet explorer
try:
! print("Trying to unregister Toolbar.\n")
hkey = _winreg.CreateKey( _winreg.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Internet Explorer\\Toolbar" )
_winreg.DeleteValue( hkey, comclass._reg_clsid_ )
except WindowsError:
! print("Couldn't delete registry value.\nhkey: %d\tCLSID: %s\n" % ( hkey, comclass._reg_clsid_ ))
else:
! print("Deleting reg key succeeded.\n")
# entry point
Index: trybag.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/trybag.py,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -C2 -d -r1.1 -r1.1.4.1
*** trybag.py 1 Sep 1999 22:59:21 -0000 1.1
--- trybag.py 26 Nov 2008 09:03:29 -0000 1.1.4.1
***************
*** 13,17 ****
def Read(self, propName, varType, errorLog):
! print "read: name=", propName, "type=", varType
if not self.data.has_key(propName):
if errorLog:
--- 13,17 ----
def Read(self, propName, varType, errorLog):
! print("read: name=", propName, "type=", varType)
if not self.data.has_key(propName):
if errorLog:
***************
*** 22,26 ****
def Write(self, propName, value):
! print "write: name=", propName, "value=", value
self.data[propName] = value
--- 22,26 ----
def Write(self, propName, value):
! print("write: name=", propName, "value=", value)
self.data[propName] = value
***************
*** 38,45 ****
def Load(self, bag, log):
! print bag.Read('prop1', VT_EMPTY, log)
! print bag.Read('prop2', VT_EMPTY, log)
try:
! print bag.Read('prop3', VT_EMPTY, log)
except exception.Exception:
pass
--- 38,45 ----
def Load(self, bag, log):
! print(bag.Read('prop1', VT_EMPTY, log))
! print(bag.Read('prop2', VT_EMPTY, log))
try:
! print(bag.Read('prop3', VT_EMPTY, log))
except exception.Exception:
pass
***************
*** 54,58 ****
def AddError(self, propName, excepInfo):
! print "error: propName=", propName, "error=", excepInfo
def test():
--- 54,58 ----
def AddError(self, propName, excepInfo):
! print("error: propName=", propName, "error=", excepInfo)
def test():
Index: excelRTDServer.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/excelRTDServer.py,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -C2 -d -r1.1 -r1.1.4.1
*** excelRTDServer.py 13 Feb 2005 12:08:29 -0000 1.1
--- excelRTDServer.py 26 Nov 2008 09:03:29 -0000 1.1.4.1
***************
*** 137,141 ****
try:
self.topics[TopicID] = self.CreateTopic(Strings)
! except Exception, why:
raise COMException(desc=str(why))
GetNewValues = True
--- 137,141 ----
try:
self.topics[TopicID] = self.CreateTopic(Strings)
! except Exception as why:
raise COMException(desc=str(why))
GetNewValues = True
***************
*** 224,228 ****
Will raise NotImplemented if not overridden.
"""
! raise NotImplemented, 'Subclass must implement'
# Overridable class events...
--- 224,228 ----
Will raise NotImplemented if not overridden.
"""
! raise NotImplemented('Subclass must implement')
# Overridable class events...
***************
*** 257,261 ****
Gives us a chance to check if our topic data needs to be
changed (eg. check a file, quiz a database, etc)."""
! raise NotImplemented, 'subclass must implement'
def Reset(self):
--- 257,261 ----
Gives us a chance to check if our topic data needs to be
changed (eg. check a file, quiz a database, etc)."""
! raise NotImplemented('subclass must implement')
def Reset(self):
***************
*** 364,372 ****
try:
self.cmd, self.delay = self.TopicStrings
! except Exception, E:
# We could simply return a "# ERROR" type string as the
# topic value, but explosions like this should be able to get handled by
# the VBA-side "On Error" stuff.
! raise ValueError, "Invalid topic strings: %s" % str(TopicStrings)
#self.cmd = str(self.cmd)
--- 364,372 ----
try:
self.cmd, self.delay = self.TopicStrings
! except Exception as E:
# We could simply return a "# ERROR" type string as the
# topic value, but explosions like this should be able to get handled by
# the VBA-side "On Error" stuff.
! raise ValueError("Invalid topic strings: %s" % str(TopicStrings))
#self.cmd = str(self.cmd)
Index: dump_clipboard.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/dump_clipboard.py,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -C2 -d -r1.1 -r1.1.4.1
*** dump_clipboard.py 8 Oct 2003 04:25:59 -0000 1.1
--- dump_clipboard.py 26 Nov 2008 09:03:29 -0000 1.1.4.1
***************
*** 16,24 ****
def DumpClipboard():
do = pythoncom.OleGetClipboard()
! print "Dumping all clipboard formats..."
for fe in do.EnumFormatEtc():
fmt, td, aspect, index, tymed = fe
tymeds_this = [getattr(pythoncom, t) for t in tymeds if tymed & getattr(pythoncom, t)]
! print "Clipboard format", format_name_map.get(fmt,str(fmt))
for t_this in tymeds_this:
# As we are enumerating there should be no need to call
--- 16,24 ----
def DumpClipboard():
do = pythoncom.OleGetClipboard()
! print("Dumping all clipboard formats...")
for fe in do.EnumFormatEtc():
fmt, td, aspect, index, tymed = fe
tymeds_this = [getattr(pythoncom, t) for t in tymeds if tymed & getattr(pythoncom, t)]
! print("Clipboard format", format_name_map.get(fmt,str(fmt)))
for t_this in tymeds_this:
# As we are enumerating there should be no need to call
***************
*** 28,32 ****
do.QueryGetData(fetc_query)
except pythoncom.com_error:
! print "Eeek - QGD indicated failure for tymed", t_this
# now actually get it.
medium = do.GetData(fetc_query)
--- 28,32 ----
do.QueryGetData(fetc_query)
except pythoncom.com_error:
! print("Eeek - QGD indicated failure for tymed", t_this)
# now actually get it.
medium = do.GetData(fetc_query)
***************
*** 55,59 ****
else:
data = "*** unknown tymed!"
! print " -> got", data
do = None
--- 55,59 ----
else:
data = "*** unknown tymed!"
! print(" -> got", data)
do = None
***************
*** 61,64 ****
DumpClipboard()
if pythoncom._GetInterfaceCount()+pythoncom._GetGatewayCount():
! print "XXX - Leaving with %d/%d COM objects alive" % \
! (pythoncom._GetInterfaceCount(), pythoncom._GetGatewayCount())
--- 61,64 ----
DumpClipboard()
if pythoncom._GetInterfaceCount()+pythoncom._GetGatewayCount():
! print("XXX - Leaving with %d/%d COM objects alive" % \
! (pythoncom._GetInterfaceCount(), pythoncom._GetGatewayCount()))
Index: excelAddin.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/excelAddin.py,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -C2 -d -r1.1 -r1.1.4.1
*** excelAddin.py 18 Aug 2003 12:31:52 -0000 1.1
--- excelAddin.py 26 Nov 2008 09:03:29 -0000 1.1.4.1
***************
*** 80,84 ****
def OnConnection(self, application, connectMode, addin, custom):
! print "OnConnection", application, connectMode, addin, custom
try:
self.appHostApp = application
--- 80,84 ----
def OnConnection(self, application, connectMode, addin, custom):
! print("OnConnection", application, connectMode, addin, custom)
try:
self.appHostApp = application
***************
*** 92,116 ****
btnMyButton.Width = "34"
cbcMyBar.Visible = True
! except pythoncom.com_error, (hr, msg, exc, arg):
! print "The Excel call failed with code %d: %s" % (hr, msg)
if exc is None:
! print "There is no extended error information"
else:
wcode, source, text, helpFile, helpId, scode = exc
! print "The source of the error is", source
! print "The error message is", text
! print "More info can be found in %s (id=%d)" % (helpFile, helpId)
def OnDisconnection(self, mode, custom):
! print "OnDisconnection"
self.appHostApp.CommandBars("PythonBar").Delete
self.appHostApp=None
def OnAddInsUpdate(self, custom):
! print "OnAddInsUpdate", custom
def OnStartupComplete(self, custom):
! print "OnStartupComplete", custom
def OnBeginShutdown(self, custom):
! print "OnBeginShutdown", custom
def RegisterAddin(klass):
--- 92,117 ----
btnMyButton.Width = "34"
cbcMyBar.Visible = True
! except pythoncom.com_error as xxx_todo_changeme:
! (hr, msg, exc, arg) = xxx_todo_changeme.args
! print("The Excel call failed with code %d: %s" % (hr, msg))
if exc is None:
! print("There is no extended error information")
else:
wcode, source, text, helpFile, helpId, scode = exc
! print("The source of the error is", source)
! print("The error message is", text)
! print("More info can be found in %s (id=%d)" % (helpFile, helpId))
def OnDisconnection(self, mode, custom):
! print("OnDisconnection")
self.appHostApp.CommandBars("PythonBar").Delete
self.appHostApp=None
def OnAddInsUpdate(self, custom):
! print("OnAddInsUpdate", custom)
def OnStartupComplete(self, custom):
! print("OnStartupComplete", custom)
def OnBeginShutdown(self, custom):
! print("OnBeginShutdown", custom)
def RegisterAddin(klass):
Index: outlookAddin.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/outlookAddin.py,v
retrieving revision 1.2
retrieving revision 1.2.4.1
diff -C2 -d -r1.2 -r1.2.4.1
*** outlookAddin.py 27 Oct 2002 10:20:19 -0000 1.2
--- outlookAddin.py 26 Nov 2008 09:03:29 -0000 1.2.4.1
***************
*** 50,56 ****
def OnItemAdd(self, item):
try:
! print "An item was added to the inbox with subject:", item.Subject
except AttributeError:
! print "An item was added to the inbox, but it has no subject! - ", repr(item)
--- 50,56 ----
def OnItemAdd(self, item):
try:
! print("An item was added to the inbox with subject:", item.Subject)
except AttributeError:
! print("An item was added to the inbox, but it has no subject! - ", repr(item))
***************
*** 64,68 ****
_reg_policy_spec_ = "win32com.server.policy.EventHandlerPolicy"
def OnConnection(self, application, connectMode, addin, custom):
! print "OnConnection", application, connectMode, addin, custom
# ActiveExplorer may be none when started without a UI (eg, WinCE synchronisation)
activeExplorer = application.ActiveExplorer()
--- 64,68 ----
_reg_policy_spec_ = "win32com.server.policy.EventHandlerPolicy"
def OnConnection(self, application, connectMode, addin, custom):
! print("OnConnection", application, connectMode, addin, custom)
# ActiveExplorer may be none when started without a UI (eg, WinCE synchronisation)
activeExplorer = application.ActiveExplorer()
***************
*** 82,92 ****
def OnDisconnection(self, mode, custom):
! print "OnDisconnection"
def OnAddInsUpdate(self, custom):
! print "OnAddInsUpdate", custom
def OnStartupComplete(self, custom):
! print "OnStartupComplete", custom
def OnBeginShutdown(self, custom):
! print "OnBeginShutdown", custom
def RegisterAddin(klass):
--- 82,92 ----
def OnDisconnection(self, mode, custom):
! print("OnDisconnection")
def OnAddInsUpdate(self, custom):
! print("OnAddInsUpdate", custom)
def OnStartupComplete(self, custom):
! print("OnStartupComplete", custom)
def OnBeginShutdown(self, custom):
! print("OnBeginShutdown", custom)
def RegisterAddin(klass):
Index: connect.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/connect.py,v
retrieving revision 1.2.4.1
retrieving revision 1.2.4.2
diff -C2 -d -r1.2.4.1 -r1.2.4.2
*** connect.py 26 Nov 2008 07:17:39 -0000 1.2.4.1
--- connect.py 26 Nov 2008 09:03:29 -0000 1.2.4.2
***************
*** 56,60 ****
server.DoIt(val)
if client.last_event_arg != val:
! raise RuntimeError, "Sent %r, but got back %r" % (val, client.last_event_arg)
if verbose:
print "Sent and received %r" % val
--- 56,60 ----
server.DoIt(val)
if client.last_event_arg != val:
! raise RuntimeError("Sent %r, but got back %r" % (val, client.last_event_arg))
if verbose:
print "Sent and received %r" % val
Index: eventsFreeThreaded.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/eventsFreeThreaded.py,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -C2 -d -r1.1 -r1.1.4.1
*** eventsFreeThreaded.py 27 Feb 2006 05:38:33 -0000 1.1
--- eventsFreeThreaded.py 26 Nov 2008 09:03:29 -0000 1.1.4.1
***************
*** 46,55 ****
#
thread = win32api.GetCurrentThreadId()
! print "OnDocumentComplete event processed on thread %d"%thread
# Set the event our main thread is waiting on.
win32event.SetEvent(self.event)
def OnQuit(self):
thread = win32api.GetCurrentThreadId()
! print "OnQuit event processed on thread %d"%thread
win32event.SetEvent(self.event)
--- 46,55 ----
#
thread = win32api.GetCurrentThreadId()
! print("OnDocumentComplete event processed on thread %d"%thread)
# Set the event our main thread is waiting on.
win32event.SetEvent(self.event)
def OnQuit(self):
thread = win32api.GetCurrentThreadId()
! print("OnQuit event processed on thread %d"%thread)
win32event.SetEvent(self.event)
***************
*** 59,69 ****
thread = win32api.GetCurrentThreadId()
! print 'TestExplorerEvents created IE object on thread %d'%thread
iexplore.Visible = 1
try:
iexplore.Navigate(win32api.GetFullPathName('..\\readme.htm'))
! except pythoncom.com_error, details:
! print "Warning - could not open the test HTML file", details
# In this free-threaded example, we can simply wait until an event has
--- 59,69 ----
thread = win32api.GetCurrentThreadId()
! print('TestExplorerEvents created IE object on thread %d'%thread)
iexplore.Visible = 1
try:
iexplore.Navigate(win32api.GetFullPathName('..\\readme.htm'))
! except pythoncom.com_error as details:
! print("Warning - could not open the test HTML file", details)
# In this free-threaded example, we can simply wait until an event has
***************
*** 71,75 ****
rc = win32event.WaitForSingleObject(iexplore.event, 2000)
if rc != win32event.WAIT_OBJECT_0:
! print "Document load event FAILED to fire!!!"
iexplore.Quit()
--- 71,75 ----
rc = win32event.WaitForSingleObject(iexplore.event, 2000)
if rc != win32event.WAIT_OBJECT_0:
! print("Document load event FAILED to fire!!!")
iexplore.Quit()
***************
*** 80,87 ****
rc = win32event.WaitForSingleObject(iexplore.event, 2000)
if rc != win32event.WAIT_OBJECT_0:
! print "OnQuit event FAILED to fire!!!"
iexplore = None
! print "Finished the IE event sample!"
if __name__=='__main__':
--- 80,87 ----
rc = win32event.WaitForSingleObject(iexplore.event, 2000)
if rc != win32event.WAIT_OBJECT_0:
! print("OnQuit event FAILED to fire!!!")
iexplore = None
! print("Finished the IE event sample!")
if __name__=='__main__':
Index: eventsApartmentThreaded.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/eventsApartmentThreaded.py,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -C2 -d -r1.1 -r1.1.4.1
*** eventsApartmentThreaded.py 27 Feb 2006 05:38:33 -0000 1.1
--- eventsApartmentThreaded.py 26 Nov 2008 09:03:29 -0000 1.1.4.1
***************
*** 37,46 ****
URL=pythoncom.Empty):
thread = win32api.GetCurrentThreadId()
! print "OnDocumentComplete event processed on thread %d"%thread
# Set the event our main thread is waiting on.
win32event.SetEvent(self.event)
def OnQuit(self):
thread = win32api.GetCurrentThreadId()
! print "OnQuit event processed on thread %d"%thread
win32event.SetEvent(self.event)
--- 37,46 ----
URL=pythoncom.Empty):
thread = win32api.GetCurrentThreadId()
! print("OnDocumentComplete event processed on thread %d"%thread)
# Set the event our main thread is waiting on.
win32event.SetEvent(self.event)
def OnQuit(self):
thread = win32api.GetCurrentThreadId()
! print("OnQuit event processed on thread %d"%thread)
win32event.SetEvent(self.event)
***************
*** 68,82 ****
thread = win32api.GetCurrentThreadId()
! print 'TestExplorerEvents created IE object on thread %d'%thread
iexplore.Visible = 1
try:
iexplore.Navigate(win32api.GetFullPathName('..\\readme.htm'))
! except pythoncom.com_error, details:
! print "Warning - could not open the test HTML file", details
# Wait for the event to be signalled while pumping messages.
if not WaitWhileProcessingMessages(iexplore.event):
! print "Document load event FAILED to fire!!!"
iexplore.Quit()
--- 68,82 ----
thread = win32api.GetCurrentThreadId()
! print('TestExplorerEvents created IE object on thread %d'%thread)
iexplore.Visible = 1
try:
iexplore.Navigate(win32api.GetFullPathName('..\\readme.htm'))
! except pythoncom.com_error as details:
! print("Warning - could not open the test HTML file", details)
# Wait for the event to be signalled while pumping messages.
if not WaitWhileProcessingMessages(iexplore.event):
! print("Document load event FAILED to fire!!!")
iexplore.Quit()
***************
*** 87,91 ****
# happens properly!
if not WaitWhileProcessingMessages(iexplore.event):
! print "OnQuit event FAILED to fire!!!"
iexplore = None
--- 87,91 ----
# happens properly!
if not WaitWhileProcessingMessages(iexplore.event):
! print("OnQuit event FAILED to fire!!!")
iexplore = None
Index: iebutton.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/demos/iebutton.py,v
retrieving revision 1.3.4.1
retrieving revision 1.3.4.2
diff -C2 -d -r1.3.4.1 -r1.3.4.2
*** iebutton.py 1 Oct 2008 09:39:27 -0000 1.3.4.1
--- iebutton.py 26 Nov 2008 09:03:29 -0000 1.3.4.2
***************
*** 71,75 ****
def __call__(self,*args):
! print 'STUB: ',self.name,args
class IEButton:
--- 71,75 ----
def __call__(self,*args):
! print('STUB: ',self.name,args)
class IEButton:
***************
*** 89,93 ****
for method in self._public_methods_:
if not hasattr(self,method):
! print 'providing default stub for %s' % method
setattr(self,method,Stub(method))
--- 89,93 ----
for method in self._public_methods_:
if not hasattr(self,method):
! print('providing default stub for %s' % method)
setattr(self,method,Stub(method))
***************
*** 110,115 ****
def Exec(self, pguidCmdGroup, nCmdID, nCmdExecOpt, pvaIn):
! print pguidCmdGroup, nCmdID, nCmdExecOpt, pvaIn
! print "IOleCommandTarget::Exec called."
#self.webbrowser.ShowBrowserBar(GUID_IETOOLBAR, not is_ietoolbar_visible())
--- 110,115 ----
def Exec(self, pguidCmdGroup, nCmdID, nCmdExecOpt, pvaIn):
! print(pguidCmdGroup, nCmdID, nCmdExecOpt, pvaIn)
! print("IOleCommandTarget::Exec called.")
#self.webbrowser.ShowBrowserBar(GUID_IETOOLBAR, not is_ietoolbar_visible())
***************
*** 142,148 ****
_winreg.SetValueEx( hKey, "HotIcon", 0, _winreg.REG_SZ, classobj._hot_icon_)
except WindowsError:
! print "Couldn't set standard toolbar reg keys."
else:
! print "Set standard toolbar reg keys."
def unregister(classobj):
--- 142,148 ----
_winreg.SetValueEx( hKey, "HotIcon", 0, _winreg.REG_SZ, classobj._hot_icon_)
except WindowsError:
! print("Couldn't set standard toolbar reg keys.")
else:
! print("Set standard toolbar reg keys.")
def unregister(classobj):
***************
*** 160,166 ****
_winreg.DeleteKey( _winreg.HKEY_LOCAL_MACHINE, subKeyCLSID )
except WindowsError:
! print "Couldn't delete Standard toolbar regkey."
else:
! print "Deleted Standard toolbar regkey."
#
--- 160,166 ----
_winreg.DeleteKey( _winreg.HKEY_LOCAL_MACHINE, subKeyCLSID )
except WindowsError:
! print("Couldn't delete Standard toolbar regkey.")
else:
! print("Deleted Standard toolbar regkey.")
#
|