pywin32-checkins Mailing List for Python for Windows Extensions (Page 45)
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(6) |
Jul
(50) |
Aug
(11) |
Sep
(24) |
Oct
(184) |
Nov
(118) |
Dec
(22) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(31) |
Feb
(25) |
Mar
(34) |
Apr
(105) |
May
(49) |
Jun
(38) |
Jul
(39) |
Aug
(7) |
Sep
(98) |
Oct
(79) |
Nov
(20) |
Dec
(17) |
2005 |
Jan
(66) |
Feb
(32) |
Mar
(43) |
Apr
(30) |
May
(58) |
Jun
(30) |
Jul
(16) |
Aug
(4) |
Sep
(21) |
Oct
(42) |
Nov
(11) |
Dec
(14) |
2006 |
Jan
(42) |
Feb
(30) |
Mar
(22) |
Apr
(1) |
May
(9) |
Jun
(15) |
Jul
(20) |
Aug
(9) |
Sep
(8) |
Oct
(1) |
Nov
(9) |
Dec
(43) |
2007 |
Jan
(52) |
Feb
(45) |
Mar
(20) |
Apr
(12) |
May
(59) |
Jun
(39) |
Jul
(35) |
Aug
(31) |
Sep
(17) |
Oct
(20) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(28) |
Feb
(111) |
Mar
(4) |
Apr
(27) |
May
(40) |
Jun
(27) |
Jul
(32) |
Aug
(94) |
Sep
(87) |
Oct
(153) |
Nov
(336) |
Dec
(331) |
2009 |
Jan
(298) |
Feb
(127) |
Mar
(20) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
2010 |
Jan
(7) |
Feb
(1) |
Mar
|
Apr
|
May
(15) |
Jun
(4) |
Jul
(3) |
Aug
(28) |
Sep
(1) |
Oct
(19) |
Nov
(16) |
Dec
(6) |
2011 |
Jan
(2) |
Feb
(18) |
Mar
(17) |
Apr
(12) |
May
(5) |
Jun
(11) |
Jul
(7) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
(4) |
Dec
|
2012 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(8) |
May
(4) |
Jun
(3) |
Jul
(13) |
Aug
(27) |
Sep
(8) |
Oct
(9) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
(10) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(9) |
2014 |
Jan
(2) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(6) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Mark H. <mha...@us...> - 2008-12-04 03:38:25
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axdebug In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23408/com/win32comext/axdebug Modified Files: codecontainer.py gateways.py Log Message: remove use of string module Index: gateways.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/gateways.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gateways.py 18 Jun 2006 13:18:26 -0000 1.3 --- gateways.py 4 Dec 2008 03:38:20 -0000 1.4 *************** *** 8,12 **** import win32com.server.connect import winerror - import string class EnumDebugCodeContexts(ListEnumeratorGateway): --- 8,11 ---- *************** *** 71,76 **** """Provides the functionality of IDebugDocumentProvider, plus a context within a project tree. """ ! _public_methods_ = string.split("""EnumChildren GetParent SetDocumentProvider ! Close Attach Detach""") + \ DebugDocumentProvider._public_methods_ _com_interfaces_ = [axdebug.IID_IDebugDocumentProvider] + \ --- 70,75 ---- """Provides the functionality of IDebugDocumentProvider, plus a context within a project tree. """ ! _public_methods_ = """EnumChildren GetParent SetDocumentProvider ! Close Attach Detach""".split() + \ DebugDocumentProvider._public_methods_ _com_interfaces_ = [axdebug.IID_IDebugDocumentProvider] + \ *************** *** 100,104 **** """Event interface for DebugApplicationNode object. """ ! _public_methods_ = string.split("onAddChild onRemoveChild onDetach") _com_interfaces_ = [axdebug.IID_IDebugApplicationNodeEvents] def __init__(self): --- 99,103 ---- """Event interface for DebugApplicationNode object. """ ! _public_methods_ = "onAddChild onRemoveChild onDetach".split() _com_interfaces_ = [axdebug.IID_IDebugApplicationNodeEvents] def __init__(self): *************** *** 204,209 **** class DebugDocumentTextEvents: ! _public_methods_ = string.split("""onDestroy onInsertText onRemoveText ! onReplaceText onUpdateTextAttributes onUpdateDocumentAttributes""") _com_interfaces_ = [ axdebug.IID_IDebugDocumentTextEvents ] def __init__(self): --- 203,209 ---- class DebugDocumentTextEvents: ! _public_methods_ = """onDestroy onInsertText onRemoveText ! onReplaceText onUpdateTextAttributes ! onUpdateDocumentAttributes""".split() _com_interfaces_ = [ axdebug.IID_IDebugDocumentTextEvents ] def __init__(self): Index: codecontainer.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/codecontainer.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** codecontainer.py 27 Nov 2008 09:42:42 -0000 1.7 --- codecontainer.py 4 Dec 2008 03:38:20 -0000 1.8 *************** *** 5,9 **** """ ! import string, sys from win32com.axdebug import axdebug import tokenize --- 5,9 ---- """ ! import sys from win32com.axdebug import axdebug import tokenize *************** *** 15,23 **** _keywords = {} # set of Python keywords ! for name in string.split(""" and assert break class continue def del elif else except exec finally for from global if import in is lambda not or pass print raise return try while ! """): _keywords[name] = 1 --- 15,23 ---- _keywords = {} # set of Python keywords ! for name in """ and assert break class continue def del elif else except exec finally for from global if import in is lambda not or pass print raise return try while ! """.split(): _keywords[name] = 1 *************** *** 89,93 **** def _buildline(self, pos): ! i = string.find(self.text, '\n', pos) if i < 0: newpos = len(self.text) --- 89,93 ---- def _buildline(self, pos): ! i = self.text.find('\n', pos) if i < 0: newpos = len(self.text) *************** *** 221,225 **** fname = name if dnt==axdebug.DOCUMENTNAMETYPE_APPNODE: ! return string.split(name, ".")[-1] elif dnt==axdebug.DOCUMENTNAMETYPE_TITLE: return fname --- 221,225 ---- fname = name if dnt==axdebug.DOCUMENTNAMETYPE_APPNODE: ! return name.split(".")[-1] elif dnt==axdebug.DOCUMENTNAMETYPE_TITLE: return fname |
From: Mark H. <mha...@us...> - 2008-12-04 03:38:25
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23408/win32/Lib Modified Files: regcheck.py Log Message: remove use of string module Index: regcheck.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/regcheck.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** regcheck.py 23 Oct 2008 07:39:12 -0000 1.8 --- regcheck.py 4 Dec 2008 03:38:20 -0000 1.9 *************** *** 21,26 **** def CheckPathString(pathString): ! import string ! for path in string.split(pathString, ";"): if not os.path.isdir(path): return "'%s' is not a valid directory!" % path --- 21,25 ---- def CheckPathString(pathString): ! for path in pathString.split(";"): if not os.path.isdir(path): return "'%s' is not a valid directory!" % path |
From: Mark H. <mha...@us...> - 2008-12-04 03:38:25
|
Update of /cvsroot/pywin32/pywin32/win32/scripts/VersionStamp In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23408/win32/scripts/VersionStamp Modified Files: bulkstamp.py Log Message: remove use of string module Index: bulkstamp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/scripts/VersionStamp/bulkstamp.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** bulkstamp.py 27 Nov 2008 09:42:42 -0000 1.8 --- bulkstamp.py 4 Dec 2008 03:38:20 -0000 1.9 *************** *** 35,39 **** import verstamp import fnmatch - import string import win32api --- 35,38 ---- *************** *** 79,86 **** for i in range(len(lines)): ! line = string.strip(lines[i]) if line != '' and line[0] != '#': ! idx1 = string.find(line, ' ') ! idx2 = string.find(line, '\t') if idx1 == -1 or idx2 < idx1: idx1 = idx2 --- 78,85 ---- for i in range(len(lines)): ! line = lines[i].strip() if line != '' and line[0] != '#': ! idx1 = line.find(' ') ! idx2 = line.find('\t') if idx1 == -1 or idx2 < idx1: idx1 = idx2 *************** *** 90,94 **** key = line[:idx1] ! val = string.strip(line[idx1:]) if key in vars: retvars[key] = val --- 89,93 ---- key = line[:idx1] ! val = line[idx1:].strip() if key in vars: retvars[key] = val *************** *** 112,116 **** numStamped = 0 try: ! build = string.atoi(build) except ValueError: print 'ERROR: build number is not a number: %s' % build --- 111,115 ---- numStamped = 0 try: ! build = int(build) except ValueError: print 'ERROR: build number is not a number: %s' % build |
From: Mark H. <mha...@us...> - 2008-12-04 03:38:25
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axscript/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23408/com/win32comext/axscript/test Modified Files: leakTest.py testHost4Dbg.py Log Message: remove use of string module Index: testHost4Dbg.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/test/testHost4Dbg.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** testHost4Dbg.py 1 Sep 1999 23:12:51 -0000 1.1 --- testHost4Dbg.py 4 Dec 2008 03:38:20 -0000 1.2 *************** *** 1,3 **** ! import string, os, sys, traceback from win32com.axscript import axscript from win32com.axscript.server import axsite --- 1,3 ---- ! import os, sys, traceback from win32com.axscript import axscript from win32com.axscript.server import axsite *************** *** 24,30 **** _public_methods_ = [ 'echo', 'msgbox' ] def echo(self, *args): ! print string.join(map(str, args)) def msgbox(self, *args): ! msg = string.join(map(str, args)) win32ui.MessageBox(msg) --- 24,30 ---- _public_methods_ = [ 'echo', 'msgbox' ] def echo(self, *args): ! print ''.join(map(str, args)) def msgbox(self, *args): ! msg = ''.join(map(str, args)) win32ui.MessageBox(msg) Index: leakTest.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/test/leakTest.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** leakTest.py 27 Nov 2008 03:53:25 -0000 1.2 --- leakTest.py 4 Dec 2008 03:38:20 -0000 1.3 *************** *** 1,3 **** ! import string, sys from win32com.axscript.server.error import Exception from win32com.axscript import axscript --- 1,3 ---- ! import sys from win32com.axscript.server.error import Exception from win32com.axscript import axscript *************** *** 19,23 **** if st is None: st = "" text = st + "\n" + (" " * (char-1)) + "^" + "\n" + exc[2] ! for line in string.split(text,"\n"): print " >" + line --- 19,23 ---- if st is None: st = "" text = st + "\n" + (" " * (char-1)) + "^" + "\n" + exc[2] ! for line in text.splitlines(): print " >" + line *************** *** 37,41 **** def echo(self, *args): ! self.last = string.join(map(str, args)) if self.verbose: for arg in args: --- 37,41 ---- def echo(self, *args): ! self.last = ''.join(map(str, args)) if self.verbose: for arg in args: |
From: Mark H. <mha...@us...> - 2008-12-04 03:38:24
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23408/win32/Demos Modified Files: rastest.py Log Message: remove use of string module Index: rastest.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/rastest.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** rastest.py 27 Nov 2008 04:15:21 -0000 1.4 --- rastest.py 4 Dec 2008 03:38:20 -0000 1.5 *************** *** 3,7 **** import sys - import string import os import win32ras --- 3,6 ---- *************** *** 88,94 **** def Disconnect( rasEntry ): # Need to find the entry ! name = string.lower( rasEntry ) for hcon, entryName, devName, devType in win32ras.EnumConnections(): ! if string.lower( entryName ) == name: win32ras.HangUp( hcon ) print "Disconnected from", rasEntry --- 87,93 ---- def Disconnect( rasEntry ): # Need to find the entry ! name = rasEntry.lower() for hcon, entryName, devName, devType in win32ras.EnumConnections(): ! if entryName.lower() == name: win32ras.HangUp( hcon ) print "Disconnected from", rasEntry |
From: Mark H. <mha...@us...> - 2008-12-04 03:36:57
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23355/win32/Demos Modified Files: win32rcparser_demo.py Log Message: Use dict iterator Index: win32rcparser_demo.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32rcparser_demo.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** win32rcparser_demo.py 1 Oct 2008 14:44:53 -0000 1.3 --- win32rcparser_demo.py 4 Dec 2008 03:36:52 -0000 1.4 *************** *** 64,68 **** # Load the .rc file. resources = win32rcparser.Parse(g_rcname) ! for id, ddef in resources.dialogs.items(): print "Displaying dialog", id w=DemoWindow(ddef) --- 64,68 ---- # Load the .rc file. resources = win32rcparser.Parse(g_rcname) ! for id, ddef in resources.dialogs.iteritems(): print "Displaying dialog", id w=DemoWindow(ddef) |
From: Mark H. <mha...@us...> - 2008-12-04 03:18:37
|
Update of /cvsroot/pywin32/pywin32/com/win32com/servers In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22614/win32com/servers Modified Files: dictionary.py Log Message: remove all support for NeedUnicodeConversions in a b/w compat way Index: dictionary.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/servers/dictionary.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** dictionary.py 27 Nov 2008 04:15:21 -0000 1.4 --- dictionary.py 4 Dec 2008 03:18:32 -0000 1.5 *************** *** 32,36 **** """ - import string import pythoncom from win32com.server import util, policy --- 32,35 ---- *************** *** 43,50 **** from winerror import S_OK - UnicodeType = pywintypes.UnicodeType - StringType = types.StringType - - class DictionaryPolicy(policy.BasicWrapPolicy): ### BasicWrapPolicy looks for this --- 42,45 ---- *************** *** 79,86 **** key = args[0] ! if type(key) == UnicodeType: pass ! elif type(key) == StringType: ! key = pywintypes.Unicode(key) else: ### the nArgErr thing should be 0-based, not reversed... sigh --- 74,81 ---- key = args[0] ! if type(key) == unicode: pass ! elif type(key) == str: ! key = unicode(key) else: ### the nArgErr thing should be 0-based, not reversed... sigh *************** *** 124,129 **** ### this is a copy of MappedWrapPolicy._getidsofnames_ ... ! # Note: these names will always be StringType ! name = string.lower(names[0]) try: return (self._name_to_dispid_[name],) --- 119,123 ---- ### this is a copy of MappedWrapPolicy._getidsofnames_ ... ! name = names[0].lower() try: return (self._name_to_dispid_[name],) |
From: Mark H. <mha...@us...> - 2008-12-04 03:18:37
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22614/win32com/client Modified Files: __init__.py build.py dynamic.py genpy.py makepy.py Log Message: remove all support for NeedUnicodeConversions in a b/w compat way Index: genpy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/genpy.py,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** genpy.py 27 Nov 2008 11:17:32 -0000 1.60 --- genpy.py 4 Dec 2008 03:18:32 -0000 1.61 *************** *** 23,27 **** error = "makepy.error" ! makepy_version = "0.4.98" # Written to generated file. GEN_FULL="full" --- 23,27 ---- error = "makepy.error" ! makepy_version = "0.5.00" # Written to generated file. GEN_FULL="full" *************** *** 29,39 **** GEN_DEMAND_CHILD = "demand(child)" - try: - TrueRepr = repr(True) - FalseRepr = repr(False) - except NameError: - TrueRepr = "1" - FalseRepr = "0" - # This map is used purely for the users benefit -it shows the # raw, underlying type of Alias/Enums, etc. The COM implementation --- 29,32 ---- *************** *** 543,547 **** print >> stream, "\t#This class has a __len__ - this is needed so 'if object:' always returns TRUE." print >> stream, "\tdef __nonzero__(self):" ! print >> stream, "\t\treturn %s" % (TrueRepr,) class CoClassItem(build.OleItem, WritableItem): --- 536,540 ---- print >> stream, "\t#This class has a __len__ - this is needed so 'if object:' always returns TRUE." print >> stream, "\tdef __nonzero__(self):" ! print >> stream, "\t\treturn True" class CoClassItem(build.OleItem, WritableItem): *************** *** 642,646 **** class Generator: ! def __init__(self, typelib, sourceFilename, progressObject, bBuildHidden=1, bUnicodeToString=0): self.bHaveWrittenDispatchBaseClass = 0 self.bHaveWrittenCoClassBaseClass = 0 --- 635,640 ---- class Generator: ! def __init__(self, typelib, sourceFilename, progressObject, bBuildHidden=1, bUnicodeToString=None): ! assert bUnicodeToString is None, "this is deprecated and will go away" self.bHaveWrittenDispatchBaseClass = 0 self.bHaveWrittenCoClassBaseClass = 0 *************** *** 649,653 **** self.sourceFilename = sourceFilename self.bBuildHidden = bBuildHidden - self.bUnicodeToString = bUnicodeToString self.progress = progressObject # These 2 are later additions and most of the code still 'print's... --- 643,646 ---- Index: makepy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/makepy.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** makepy.py 26 Nov 2008 01:46:30 -0000 1.27 --- makepy.py 4 Dec 2008 03:18:32 -0000 1.28 *************** *** 69,73 **** import sys, os, pythoncom from win32com.client import genpy, selecttlb, gencache ! from win32com.client import NeedUnicodeConversions, Dispatch bForDemandDefault = 0 # Default value of bForDemand - toggle this to change the world - see also gencache.py --- 69,73 ---- import sys, os, pythoncom from win32com.client import genpy, selecttlb, gencache ! from win32com.client import Dispatch bForDemandDefault = 0 # Default value of bForDemand - toggle this to change the world - see also gencache.py *************** *** 211,215 **** sys.exit(1) ! def GenerateFromTypeLibSpec(typelibInfo, file = None, verboseLevel = None, progressInstance = None, bUnicodeToString=NeedUnicodeConversions, bForDemand = bForDemandDefault, bBuildHidden = 1): if verboseLevel is None: verboseLevel = 0 # By default, we use no gui and no verbose level! --- 211,216 ---- sys.exit(1) ! def GenerateFromTypeLibSpec(typelibInfo, file = None, verboseLevel = None, progressInstance = None, bUnicodeToString=None, bForDemand = bForDemandDefault, bBuildHidden = 1): ! assert bUnicodeToString is None, "this is deprecated and will go away" if verboseLevel is None: verboseLevel = 0 # By default, we use no gui and no verbose level! *************** *** 252,256 **** for typelib, info in typelibs: ! gen = genpy.Generator(typelib, info.dll, progress, bUnicodeToString=bUnicodeToString, bBuildHidden=bBuildHidden) if file is None: --- 253,257 ---- for typelib, info in typelibs: ! gen = genpy.Generator(typelib, info.dll, progress, bBuildHidden=bBuildHidden) if file is None: *************** *** 287,291 **** progress.Close() ! def GenerateChildFromTypeLibSpec(child, typelibInfo, verboseLevel = None, progressInstance = None, bUnicodeToString=NeedUnicodeConversions): if verboseLevel is None: verboseLevel = 0 # By default, we use no gui, and no verbose level for the children. --- 288,293 ---- progress.Close() ! def GenerateChildFromTypeLibSpec(child, typelibInfo, verboseLevel = None, progressInstance = None, bUnicodeToString=None): ! assert bUnicodeToString is None, "this is deprecated and will go away" if verboseLevel is None: verboseLevel = 0 # By default, we use no gui, and no verbose level for the children. *************** *** 313,317 **** progress.LogBeginGenerate(dir_path_name) ! gen = genpy.Generator(typelib, info.dll, progress, bUnicodeToString=bUnicodeToString) gen.generate_child(child, dir_path_name) progress.SetDescription("Importing module") --- 315,319 ---- progress.LogBeginGenerate(dir_path_name) ! gen = genpy.Generator(typelib, info.dll, progress) gen.generate_child(child, dir_path_name) progress.SetDescription("Importing module") *************** *** 322,326 **** import getopt hiddenSpec = 1 - bUnicodeToString = NeedUnicodeConversions outputName = None verboseLevel = 1 --- 324,327 ---- *************** *** 332,337 **** if o=='-h': hiddenSpec = 0 - elif o=='-u': - bUnicodeToString = not NeedUnicodeConversions elif o=='-o': outputName = v --- 333,336 ---- Index: dynamic.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/dynamic.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** dynamic.py 27 Nov 2008 09:33:22 -0000 1.26 --- dynamic.py 4 Dec 2008 03:18:32 -0000 1.27 *************** *** 27,31 **** import win32com.client # Needed as code we eval() references it. - from win32com.client import NeedUnicodeConversions debugging=0 # General debugging --- 27,30 ---- *************** *** 108,112 **** return entry.desc[4] ! def Dispatch(IDispatch, userName = None, createClass = None, typeinfo = None, UnicodeToString=NeedUnicodeConversions, clsctx = pythoncom.CLSCTX_SERVER): IDispatch, userName = _GetGoodDispatchAndUserName(IDispatch,userName,clsctx) if createClass is None: --- 107,112 ---- return entry.desc[4] ! def Dispatch(IDispatch, userName = None, createClass = None, typeinfo = None, UnicodeToString=None, clsctx = pythoncom.CLSCTX_SERVER): ! assert UnicodeToString is None, "this is deprecated and will go away" IDispatch, userName = _GetGoodDispatchAndUserName(IDispatch,userName,clsctx) if createClass is None: *************** *** 125,129 **** typeinfo = None olerepr = MakeOleRepr(IDispatch, typeinfo, lazydata) ! return createClass(IDispatch, olerepr, userName,UnicodeToString, lazydata) def MakeOleRepr(IDispatch, typeinfo, typecomp): --- 125,129 ---- typeinfo = None olerepr = MakeOleRepr(IDispatch, typeinfo, lazydata) ! return createClass(IDispatch, olerepr, userName, lazydata=lazydata) def MakeOleRepr(IDispatch, typeinfo, typecomp): *************** *** 149,161 **** return olerepr ! def DumbDispatch(IDispatch, userName = None, createClass = None,UnicodeToString=NeedUnicodeConversions, clsctx=pythoncom.CLSCTX_SERVER): "Dispatch with no type info" IDispatch, userName = _GetGoodDispatchAndUserName(IDispatch,userName,clsctx) if createClass is None: createClass = CDispatch ! return createClass(IDispatch, build.DispatchItem(), userName,UnicodeToString) class CDispatch: ! def __init__(self, IDispatch, olerepr, userName = None, UnicodeToString=NeedUnicodeConversions, lazydata = None): if userName is None: userName = "<unknown>" self.__dict__['_oleobj_'] = IDispatch --- 149,163 ---- return olerepr ! def DumbDispatch(IDispatch, userName = None, createClass = None,UnicodeToString=None, clsctx=pythoncom.CLSCTX_SERVER): "Dispatch with no type info" + assert UnicodeToString is None, "this is deprecated and will go away" IDispatch, userName = _GetGoodDispatchAndUserName(IDispatch,userName,clsctx) if createClass is None: createClass = CDispatch ! return createClass(IDispatch, build.DispatchItem(), userName) class CDispatch: ! def __init__(self, IDispatch, olerepr, userName=None, UnicodeToString=None, lazydata=None): ! assert UnicodeToString is None, "this is deprecated and will go away" if userName is None: userName = "<unknown>" self.__dict__['_oleobj_'] = IDispatch *************** *** 165,169 **** self.__dict__['_builtMethods_'] = {} self.__dict__['_enum_'] = None ! self.__dict__['_unicode_to_string_'] = UnicodeToString self.__dict__['_lazydata_'] = lazydata --- 167,171 ---- self.__dict__['_builtMethods_'] = {} self.__dict__['_enum_'] = None ! self.__dict__['_unicode_to_string_'] = None self.__dict__['_lazydata_'] = lazydata *************** *** 265,271 **** return self._get_good_object_(result, user, resultCLSID) ! def _wrap_dispatch_(self, ob, userName = None, returnCLSID = None, UnicodeToString = NeedUnicodeConversions): # Given a dispatch object, wrap it in a class ! return Dispatch(ob, userName, UnicodeToString=UnicodeToString) def _get_good_single_object_(self,ob,userName = None, ReturnCLSID=None): --- 267,274 ---- return self._get_good_object_(result, user, resultCLSID) ! def _wrap_dispatch_(self, ob, userName = None, returnCLSID = None, UnicodeToString=None): # Given a dispatch object, wrap it in a class ! assert UnicodeToString is None, "this is deprecated and will go away" ! return Dispatch(ob, userName) def _get_good_single_object_(self,ob,userName = None, ReturnCLSID=None): *************** *** 280,285 **** # make a new instance of (probably this) class. return self._wrap_dispatch_(ob, userName, ReturnCLSID) - elif self._unicode_to_string_ and unicode==type(ob): - return str(ob) else: return ob --- 283,286 ---- Index: __init__.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/__init__.py,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** __init__.py 26 Nov 2008 08:39:33 -0000 1.37 --- __init__.py 4 Dec 2008 03:18:32 -0000 1.38 *************** *** 7,13 **** # with dynamic.Dispatch behaviour, where dynamic objects are always used. - # This can go away - NeedUnicodeConversions = False - import pythoncom import dynamic --- 7,10 ---- *************** *** 20,24 **** def __WrapDispatch(dispatch, userName = None, resultCLSID = None, typeinfo = None, \ ! UnicodeToString = NeedUnicodeConversions, clsctx = pythoncom.CLSCTX_SERVER, WrapperClass = None): """ --- 17,21 ---- def __WrapDispatch(dispatch, userName = None, resultCLSID = None, typeinfo = None, \ ! UnicodeToString=None, clsctx = pythoncom.CLSCTX_SERVER, WrapperClass = None): """ *************** *** 26,29 **** --- 23,27 ---- otherwise cope by using CDispatch. """ + assert UnicodeToString is None, "this is deprecated and will go away" if resultCLSID is None: try: *************** *** 43,47 **** # Return a "dynamic" object - best we can do! if WrapperClass is None: WrapperClass = CDispatch ! return dynamic.Dispatch(dispatch, userName, WrapperClass, typeinfo, UnicodeToString=UnicodeToString,clsctx=clsctx) --- 41,45 ---- # Return a "dynamic" object - best we can do! if WrapperClass is None: WrapperClass = CDispatch ! return dynamic.Dispatch(dispatch, userName, WrapperClass, typeinfo, clsctx=clsctx) *************** *** 89,103 **** moniker, i, bindCtx = pythoncom.MkParseDisplayName(Pathname) dispatch = moniker.BindToObject(bindCtx, None, pythoncom.IID_IDispatch) ! return __WrapDispatch(dispatch, Pathname, clsctx = clsctx) ! def Dispatch(dispatch, userName = None, resultCLSID = None, typeinfo = None, UnicodeToString=NeedUnicodeConversions, clsctx = pythoncom.CLSCTX_SERVER): """Creates a Dispatch based COM object. """ dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx) ! return __WrapDispatch(dispatch, userName, resultCLSID, typeinfo, UnicodeToString, clsctx) ! def DispatchEx(clsid, machine=None, userName = None, resultCLSID = None, typeinfo = None, UnicodeToString=NeedUnicodeConversions, clsctx = None): """Creates a Dispatch based COM object on a specific machine. """ # If InProc is registered, DCOM will use it regardless of the machine name # (and regardless of the DCOM config for the object.) So unless the user --- 87,103 ---- moniker, i, bindCtx = pythoncom.MkParseDisplayName(Pathname) dispatch = moniker.BindToObject(bindCtx, None, pythoncom.IID_IDispatch) ! return __WrapDispatch(dispatch, Pathname, clsctx=clsctx) ! def Dispatch(dispatch, userName = None, resultCLSID = None, typeinfo = None, UnicodeToString=None, clsctx = pythoncom.CLSCTX_SERVER): """Creates a Dispatch based COM object. """ + assert UnicodeToString is None, "this is deprecated and will go away" dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx) ! return __WrapDispatch(dispatch, userName, resultCLSID, typeinfo, clsctx=clsctx) ! def DispatchEx(clsid, machine=None, userName = None, resultCLSID = None, typeinfo = None, UnicodeToString=None, clsctx = None): """Creates a Dispatch based COM object on a specific machine. """ + assert UnicodeToString is None, "this is deprecated and will go away" # If InProc is registered, DCOM will use it regardless of the machine name # (and regardless of the DCOM config for the object.) So unless the user *************** *** 112,116 **** if userName is None: userName = clsid dispatch = pythoncom.CoCreateInstanceEx(clsid, None, clsctx, serverInfo, (pythoncom.IID_IDispatch,))[0] ! return Dispatch(dispatch, userName, resultCLSID, typeinfo, UnicodeToString=UnicodeToString, clsctx=clsctx) class CDispatch(dynamic.CDispatch): --- 112,116 ---- if userName is None: userName = clsid dispatch = pythoncom.CoCreateInstanceEx(clsid, None, clsctx, serverInfo, (pythoncom.IID_IDispatch,))[0] ! return Dispatch(dispatch, userName, resultCLSID, typeinfo, clsctx=clsctx) class CDispatch(dynamic.CDispatch): *************** *** 121,126 **** if/when possible. """ ! def _wrap_dispatch_(self, ob, userName = None, returnCLSID = None, UnicodeToString = NeedUnicodeConversions): ! return Dispatch(ob, userName, returnCLSID,None,UnicodeToString) def CastTo(ob, target): --- 121,127 ---- if/when possible. """ ! def _wrap_dispatch_(self, ob, userName = None, returnCLSID = None, UnicodeToString=None): ! assert UnicodeToString is None, "this is deprecated and will go away" ! return Dispatch(ob, userName, returnCLSID,None) def CastTo(ob, target): *************** *** 473,477 **** def _get_good_single_object_(obj, obUserName=None, resultCLSID=None): if _PyIDispatchType==type(obj): ! return Dispatch(obj, obUserName, resultCLSID, UnicodeToString=NeedUnicodeConversions) return obj --- 474,478 ---- def _get_good_single_object_(obj, obUserName=None, resultCLSID=None): if _PyIDispatchType==type(obj): ! return Dispatch(obj, obUserName, resultCLSID) return obj Index: build.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/build.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** build.py 27 Nov 2008 05:39:30 -0000 1.34 --- build.py 4 Dec 2008 03:18:32 -0000 1.35 *************** *** 21,28 **** import types from keyword import iskeyword - from win32com.client import NeedUnicodeConversions import pythoncom ! from pywintypes import UnicodeType, TimeType import winerror --- 21,27 ---- import types from keyword import iskeyword import pythoncom ! from pywintypes import TimeType import winerror *************** *** 352,364 **** s = s + "%s\t\texcept pythoncom.error:\n" % (linePrefix,) s = s + "%s\t\t\treturn ret\n" % (linePrefix,) ! s = s + '%s\t\tret = Dispatch(ret, %s, %s, UnicodeToString=%d)\n' % (linePrefix,repr(name), resclsid, NeedUnicodeConversions) s = s + '%s\treturn ret' % (linePrefix) elif rd == pythoncom.VT_BSTR: ! if NeedUnicodeConversions: ! s = "%s\t# Result is a Unicode object - perform automatic string conversion\n" % (linePrefix,) ! s = s + '%s\treturn str(self._oleobj_.InvokeTypes(%d, LCID, %s, %s, %s%s))' % (linePrefix, id, fdesc[4], retDesc, repr(argsDesc), _BuildArgList(fdesc, names)) ! else: ! s = "%s\t# Result is a Unicode object - return as-is for this version of Python\n" % (linePrefix,) ! s = s + '%s\treturn self._oleobj_.InvokeTypes(%d, LCID, %s, %s, %s%s)' % (linePrefix, id, fdesc[4], retDesc, repr(argsDesc), _BuildArgList(fdesc, names)) # else s remains None if s is None: --- 351,359 ---- s = s + "%s\t\texcept pythoncom.error:\n" % (linePrefix,) s = s + "%s\t\t\treturn ret\n" % (linePrefix,) ! s = s + '%s\t\tret = Dispatch(ret, %s, %s)\n' % (linePrefix,repr(name), resclsid) s = s + '%s\treturn ret' % (linePrefix) elif rd == pythoncom.VT_BSTR: ! s = "%s\t# Result is a Unicode object\n" % (linePrefix,) ! s = s + '%s\treturn self._oleobj_.InvokeTypes(%d, LCID, %s, %s, %s%s)' % (linePrefix, id, fdesc[4], retDesc, repr(argsDesc), _BuildArgList(fdesc, names)) # else s remains None if s is None: *************** *** 557,563 **** # hack for Unicode until it repr's better. val = defArgVal[2] ! if type(val) is UnicodeType: ! return repr(str(val)) ! elif type(val) is TimeType: year=val.year; month=val.month; day=val.day; hour=val.hour; minute=val.minute; second=val.second; msec=val.msec return "pythoncom.MakeTime((%(year)d, %(month)d, %(day)d, %(hour)d, %(minute)d, %(second)d,0,0,0,%(msec)d))" % locals() --- 552,556 ---- # hack for Unicode until it repr's better. val = defArgVal[2] ! if type(val) is TimeType: year=val.year; month=val.month; day=val.day; hour=val.hour; minute=val.minute; second=val.second; msec=val.msec return "pythoncom.MakeTime((%(year)d, %(month)d, %(day)d, %(hour)d, %(minute)d, %(second)d,0,0,0,%(msec)d))" % locals() |
From: Mark H. <mha...@us...> - 2008-12-04 03:18:37
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/adsi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22614/win32comext/adsi Modified Files: __init__.py Log Message: remove all support for NeedUnicodeConversions in a b/w compat way Index: __init__.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/adsi/__init__.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** __init__.py 26 Nov 2008 08:52:32 -0000 1.3 --- __init__.py 4 Dec 2008 03:18:32 -0000 1.4 *************** *** 67,75 **** class ADSIDispatch(win32com.client.CDispatch): ! def _wrap_dispatch_(self, ob, userName = None, returnCLSID = None, UnicodeToString = win32com.client.NeedUnicodeConversions): if not userName: userName = "ADSI-object" olerepr = win32com.client.dynamic.MakeOleRepr(ob, None, None) ! return ADSIDispatch(ob, olerepr, userName, UnicodeToString = UnicodeToString) def _NewEnum(self): --- 67,76 ---- class ADSIDispatch(win32com.client.CDispatch): ! def _wrap_dispatch_(self, ob, userName = None, returnCLSID = None, UnicodeToString=None): ! assert UnicodeToString is None, "this is deprectated and will be removed" if not userName: userName = "ADSI-object" olerepr = win32com.client.dynamic.MakeOleRepr(ob, None, None) ! return ADSIDispatch(ob, olerepr, userName) def _NewEnum(self): |
From: Mark H. <mha...@us...> - 2008-12-04 03:18:37
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22614/win32com/test Modified Files: GenTestScripts.py Log Message: remove all support for NeedUnicodeConversions in a b/w compat way Index: GenTestScripts.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/GenTestScripts.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GenTestScripts.py 27 Nov 2008 05:58:17 -0000 1.4 --- GenTestScripts.py 4 Dec 2008 03:18:32 -0000 1.5 *************** *** 27,31 **** print fname, ": generating -", f = open(os.path.join(genPath, fname + ".py"), "w") ! win32com.client.makepy.GenerateFromTypeLibSpec(loadArgs, f, bQuiet = 1, bGUIProgress = 1, bUnicodeToString=NeedUnicodeConversions) f.close() print "compiling -", --- 27,31 ---- print fname, ": generating -", f = open(os.path.join(genPath, fname + ".py"), "w") ! win32com.client.makepy.GenerateFromTypeLibSpec(loadArgs, f, bQuiet = 1, bGUIProgress = 1) f.close() print "compiling -", |
From: Mark H. <mha...@us...> - 2008-12-04 03:17:01
|
Update of /cvsroot/pywin32/pywin32/com/win32com/makegw In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22552 Modified Files: makegw.py makegwparse.py Log Message: remove use of string module Index: makegw.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/makegw/makegw.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** makegw.py 25 Apr 2007 03:32:05 -0000 1.9 --- makegw.py 4 Dec 2008 03:16:49 -0000 1.10 *************** *** 48,52 **** import re - import string import makegwparse --- 48,51 ---- *************** *** 353,361 **** if method.args: for arg in method.args[:-1]: ! inoutstr = string.join(arg.inout, '][') f.write("\t\t/* [%s] */ %s,\n" % (inoutstr, arg.GetRawDeclaration())) arg = method.args[-1] ! inoutstr = string.join(arg.inout, '][') f.write("\t\t/* [%s] */ %s)\n" % (inoutstr, arg.GetRawDeclaration())) else: --- 352,360 ---- if method.args: for arg in method.args[:-1]: ! inoutstr = ']['.join(arg.inout) f.write("\t\t/* [%s] */ %s,\n" % (inoutstr, arg.GetRawDeclaration())) arg = method.args[-1] ! inoutstr = ']['.join(arg.inout) f.write("\t\t/* [%s] */ %s)\n" % (inoutstr, arg.GetRawDeclaration())) else: Index: makegwparse.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/makegw/makegwparse.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** makegwparse.py 27 Nov 2008 09:33:22 -0000 1.15 --- makegwparse.py 4 Dec 2008 03:16:49 -0000 1.16 *************** *** 14,18 **** import re import traceback - import string class error_not_found(Exception): --- 14,17 ---- |
From: Mark H. <mha...@us...> - 2008-12-04 03:13:29
|
Update of /cvsroot/pywin32/pywin32/com/win32com/servers In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22441/win32com/servers Modified Files: interp.py Log Message: remove use of pywintypes.UnicodeType Index: interp.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/servers/interp.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** interp.py 18 Dec 2002 04:20:58 -0000 1.2 --- interp.py 4 Dec 2008 03:13:25 -0000 1.3 *************** *** 13,17 **** from win32com.server.exception import Exception - from pywintypes import UnicodeType import winerror --- 13,16 ---- *************** *** 34,38 **** """Evaluate an expression. """ ! if type(exp) not in [type(''),UnicodeType]: raise Exception(desc="Must be a string",scode=winerror.DISP_E_TYPEMISMATCH) --- 33,37 ---- """Evaluate an expression. """ ! if type(exp) not in [str, unicode]: raise Exception(desc="Must be a string",scode=winerror.DISP_E_TYPEMISMATCH) *************** *** 41,45 **** """Execute a statement. """ ! if type(exp) not in [type(''), UnicodeType]: raise Exception(desc="Must be a string",scode=winerror.DISP_E_TYPEMISMATCH) exec str(exp) in self.dict --- 40,44 ---- """Execute a statement. """ ! if type(exp) not in [str, unicode]: raise Exception(desc="Must be a string",scode=winerror.DISP_E_TYPEMISMATCH) exec str(exp) in self.dict |
From: Mark H. <mha...@us...> - 2008-12-04 03:12:25
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22420/win32com/client Modified Files: tlbrowse.py Log Message: remove unused import of string module Index: tlbrowse.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/tlbrowse.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tlbrowse.py 1 Oct 2008 14:44:53 -0000 1.5 --- tlbrowse.py 4 Dec 2008 03:12:18 -0000 1.6 *************** *** 2,6 **** import win32con import win32api - import string import commctrl import pythoncom --- 2,5 ---- |
From: Mark H. <mha...@us...> - 2008-12-04 03:10:07
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22312/win32com/client Modified Files: combrowse.py Log Message: remove use of string module Index: combrowse.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/combrowse.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** combrowse.py 27 Nov 2008 09:42:41 -0000 1.9 --- combrowse.py 4 Dec 2008 03:10:02 -0000 1.10 *************** *** 171,175 **** else: try: ! lcid = string.atof(subKey) lcidkey = win32api.RegOpenKey(key, subKey) # Enumerate the platforms --- 171,175 ---- else: try: ! lcid = int(subKey) lcidkey = win32api.RegOpenKey(key, subKey) # Enumerate the platforms *************** *** 207,211 **** extraDescs.append("locale=%s"%lcid) extraDesc = "" ! if extraDescs: extraDesc = " (%s)" % string.join(extraDescs, ", ") ret.append(HLITypeLib(fname, "Type Library" + extraDesc)) ret.sort() --- 207,211 ---- extraDescs.append("locale=%s"%lcid) extraDesc = "" ! if extraDescs: extraDesc = " (%s)" % ", ".join(extraDescs) ret.append(HLITypeLib(fname, "Type Library" + extraDesc)) ret.sort() *************** *** 440,444 **** flagDescs.append(desc) if flagDescs: ! ret.append(browser.MakeHLI(string.join(flagDescs, ", "), "Function Flags")) return ret --- 440,444 ---- flagDescs.append(desc) if flagDescs: ! ret.append(browser.MakeHLI(", ".join(flagDescs), "Function Flags")) return ret *************** *** 499,503 **** break try: ! versionFlt = string.atof(versionStr) except ValueError: versionFlt = 0 # ???? --- 499,503 ---- break try: ! versionFlt = int(versionStr) except ValueError: versionFlt = 0 # ???? |
From: Mark H. <mha...@us...> - 2008-12-04 01:07:25
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15884/Pythonwin/pywin/Demos Modified Files: Tag: py3k dyndlg.py Log Message: restore capability for dialog header to use None as ext. style for b/w compat. Index: dyndlg.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/Demos/dyndlg.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 *** dyndlg.py 29 Aug 2008 06:16:06 -0000 1.1.4.1 --- dyndlg.py 4 Dec 2008 01:07:20 -0000 1.1.4.2 *************** *** 27,31 **** style = win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT cs = win32con.WS_CHILD | win32con.WS_VISIBLE ! dlg = [ ["Select Warehouse", (0, 0, 177, 93), style, 0, (8, "MS Sans Serif")], ] dlg.append([130, "Current Warehouse:", -1, (7, 7, 69, 9), cs | win32con.SS_LEFT]) dlg.append([130, "ASTORIA", 128, (16, 17, 99, 7), cs | win32con.SS_LEFT]) --- 27,31 ---- style = win32con.DS_MODALFRAME | win32con.WS_POPUP | win32con.WS_VISIBLE | win32con.WS_CAPTION | win32con.WS_SYSMENU | win32con.DS_SETFONT cs = win32con.WS_CHILD | win32con.WS_VISIBLE ! dlg = [ ["Select Warehouse", (0, 0, 177, 93), style, None, (8, "MS Sans Serif")], ] dlg.append([130, "Current Warehouse:", -1, (7, 7, 69, 9), cs | win32con.SS_LEFT]) dlg.append([130, "ASTORIA", 128, (16, 17, 99, 7), cs | win32con.SS_LEFT]) |
From: Mark H. <mha...@us...> - 2008-12-04 01:07:24
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15884/win32/src Modified Files: Tag: py3k win32dynamicdialog.cpp Log Message: restore capability for dialog header to use None as ext. style for b/w compat. Index: win32dynamicdialog.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32dynamicdialog.cpp,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -C2 -d -r1.5.2.1 -r1.5.2.2 *** win32dynamicdialog.cpp 29 Aug 2008 04:59:26 -0000 1.5.2.1 --- win32dynamicdialog.cpp 4 Dec 2008 01:07:20 -0000 1.5.2.2 *************** *** 256,259 **** --- 256,260 ---- // Extracts a string or resource id/atom from a dialog template buffer + // and updates the pointer param to reflect how many bytes were consumed. static PyObject *MakeResName(WCHAR **val) { *************** *** 280,284 **** // Given a pointer to a dialog hdr template, return a Python list to match it ! // ??? This leaks refs all over the place ??? /* Also need to handle extended templates (DLGTEMPLATEEX), quoting from MSDN: To distinguish between a standard template and an extended template, --- 281,288 ---- // Given a pointer to a dialog hdr template, return a Python list to match it ! // ??? This leaks refs all over the place ??? markh: where? It looks OK ! // to me - MakeResName creates a new reference, but its always immediately ! // placed in the new list, or the list is DECREF'd on error. ! // It could be simplified with a goto error handler though... /* Also need to handle extended templates (DLGTEMPLATEEX), quoting from MSDN: To distinguish between a standard template and an extended template, *************** *** 506,509 **** --- 510,514 ---- WCHAR *caption=NULL, *menu=NULL, *wclass=NULL, *fontname=NULL; PyObject *obcaption, *obfontname, *obfont=Py_None, *obmenu=Py_None, *obwclass=Py_None; + PyObject *obexstyle=Py_None; DLGTEMPLATE tpl={0,0,0,0,0,0,0}; WORD fontsize; *************** *** 511,523 **** CPythonDialogTemplate *ret=NULL; ! if (!PyArg_ParseTuple(obhdr, "O(hhhh)k|kOOO:DLGTEMPLATE", &obcaption, &tpl.x, &tpl.y, &tpl.cx, &tpl.cy, &tpl.style, ! &tpl.dwExtendedStyle, &obfont, &obmenu, &obwclass)) ! return NULL; // @tupleitem 0|string|caption|The caption for the window --- 516,528 ---- CPythonDialogTemplate *ret=NULL; ! if (!PyArg_ParseTuple(obhdr, "O(hhhh)k|OOOO:DLGTEMPLATE", &obcaption, &tpl.x, &tpl.y, &tpl.cx, &tpl.cy, &tpl.style, ! &obexstyle, &obfont, &obmenu, &obwclass)) ! goto cleanup; // @tupleitem 0|string|caption|The caption for the window *************** *** 526,530 **** // Note that the DS_SETFONT style need never be specified - it is determined by the font item (below) // <nl>See MSDN documentation on Dialog Boxes for allowable values. ! // @tupleitem 3|int|extStyle|The extended style bits for the dialog. Defaults to 0 if not passed. // @tupleitem 4|(int, string)|(fontSize, fontName)|A tuple describing the font, or None if the system default font is to be used. // @tupleitem 5|<o PyResourceId>|menuResource|The resource ID of the menu to be used for the dialog, or None for no menu. --- 531,535 ---- // Note that the DS_SETFONT style need never be specified - it is determined by the font item (below) // <nl>See MSDN documentation on Dialog Boxes for allowable values. ! // @tupleitem 3|int|extStyle|The extended style bits for the dialog. Defaults to 0 if not passed and None is supported for backwards compatibility. // @tupleitem 4|(int, string)|(fontSize, fontName)|A tuple describing the font, or None if the system default font is to be used. // @tupleitem 5|<o PyResourceId>|menuResource|The resource ID of the menu to be used for the dialog, or None for no menu. *************** *** 537,540 **** --- 542,550 ---- if (!PyWinObject_AsResourceIdW(obwclass, &wclass, TRUE)) goto cleanup; + if (obexstyle != Py_None) { + tpl.dwExtendedStyle = PyLong_AsUnsignedLong(obexstyle); + if (tpl.dwExtendedStyle==-1 && PyErr_Occurred()) + goto cleanup; + } tpl.style &= ~DS_SETFONT; |
From: Mark H. <mha...@us...> - 2008-12-04 01:07:24
|
Update of /cvsroot/pywin32/pywin32/win32/Demos In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15884/win32/Demos Modified Files: Tag: py3k win32gui_dialog.py win32rcparser_demo.py Log Message: restore capability for dialog header to use None as ext. style for b/w compat. Index: win32rcparser_demo.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32rcparser_demo.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 *** win32rcparser_demo.py 29 Aug 2008 04:59:23 -0000 1.2.4.1 --- win32rcparser_demo.py 4 Dec 2008 01:07:20 -0000 1.2.4.2 *************** *** 64,68 **** # Load the .rc file. resources = win32rcparser.Parse(g_rcname) ! for id, ddef in list(resources.dialogs.items()): print("Displaying dialog", id) w=DemoWindow(ddef) --- 64,68 ---- # Load the .rc file. resources = win32rcparser.Parse(g_rcname) ! for id, ddef in resources.dialogs.items(): print("Displaying dialog", id) w=DemoWindow(ddef) Index: win32gui_dialog.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32gui_dialog.py,v retrieving revision 1.7.2.3 retrieving revision 1.7.2.4 diff -C2 -d -r1.7.2.3 -r1.7.2.4 *** win32gui_dialog.py 3 Oct 2008 01:09:55 -0000 1.7.2.3 --- win32gui_dialog.py 4 Dec 2008 01:07:20 -0000 1.7.2.4 *************** *** 44,48 **** else: full_fmt += fmt ! for name, val in list(kw.items()): if name not in self.__dict__: raise ValueError("LVITEM structures do not have an item '%s'" % (name,)) --- 44,48 ---- else: full_fmt += fmt ! for name, val in kw.items(): if name not in self.__dict__: raise ValueError("LVITEM structures do not have an item '%s'" % (name,)) *************** *** 163,167 **** # Window frame and title ! dlg = [ [title, (0, 0, 210, 250), style, 0, (8, "MS Sans Serif"), None, dlgClassName], ] # ID label and text box --- 163,167 ---- # Window frame and title ! dlg = [ [title, (0, 0, 210, 250), style, None, (8, "MS Sans Serif"), None, dlgClassName], ] # ID label and text box |
From: Mark H. <mha...@us...> - 2008-12-04 00:17:19
|
Update of /cvsroot/pywin32/pywin32/win32/src/PerfMon In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13026/win32/src/PerfMon Modified Files: pyperfmon.h Log Message: consolidation of more py3k-friendly changes from py3k branch Index: pyperfmon.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PerfMon/pyperfmon.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pyperfmon.h 2 Sep 1999 00:24:54 -0000 1.1 --- pyperfmon.h 4 Dec 2008 00:17:13 -0000 1.2 *************** *** 121,128 **** static PyObject *Close(PyObject *self, PyObject *args); - // #pragma warning( disable : 4251 ) static struct memberlist memberlist[]; static PyTypeObject type; - #pragma warning( default : 4251 ) protected: --- 121,126 ---- |
From: Mark H. <mha...@us...> - 2008-12-04 00:17:18
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13026/com/win32com/src Modified Files: PyIBase.cpp Log Message: consolidation of more py3k-friendly changes from py3k branch Index: PyIBase.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PyIBase.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PyIBase.cpp 2 Nov 2003 09:55:27 -0000 1.7 --- PyIBase.cpp 4 Dec 2008 00:17:13 -0000 1.8 *************** *** 77,81 **** TCHAR buf[80]; wsprintf(buf, _T("<%hs at %p>"),ob_type->tp_name, (PyObject *)this); ! return PyString_FromTCHAR(buf); } --- 77,81 ---- TCHAR buf[80]; wsprintf(buf, _T("<%hs at %p>"),ob_type->tp_name, (PyObject *)this); ! return PyWinCoreString_FromString(buf); } |
From: Mark H. <mha...@us...> - 2008-12-04 00:17:18
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13026/Pythonwin Modified Files: win32dlg.cpp Log Message: consolidation of more py3k-friendly changes from py3k branch Index: win32dlg.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32dlg.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** win32dlg.cpp 13 Nov 2008 04:04:50 -0000 1.11 --- win32dlg.cpp 4 Dec 2008 00:17:13 -0000 1.12 *************** *** 87,97 **** if (hGlob==NULL) RETURN_API_ERR("LoadResource"); - - CDialog *pDlg = new CPythonDlg(); - PyCDialog *ret = (PyCDialog *)ui_assoc_object::make( PyCDialog::type, pDlg, TRUE); - if (ret) { - ret->hTemplate = hGlob; - ret->hInstance = hMod; - } return MakeDlgListFromResource(hGlob); } --- 87,90 ---- *************** *** 510,514 **** { PyObject *obList = NULL; ! // @pyparm list|obList||A list of [<o Dialog Header Tuple>, <o Dialog Item Tuple>, ...], which describe the dialog to be created. if (!PyArg_ParseTuple(args, "O:CreateDialogIndirect", &obList)) return NULL; --- 503,507 ---- { PyObject *obList = NULL; ! // @pyparm list|obList||A list of [<o PyDLGTEMPLATE>, <o PyDLGITEMTEMPLATE>, ...], which describe the dialog to be created. if (!PyArg_ParseTuple(args, "O:CreateDialogIndirect", &obList)) return NULL; |
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13026/win32/src Modified Files: PyHANDLE.cpp PyTime.cpp PyWinTypes.h PyWinTypesmodule.cpp win32api_display.h win32apimodule.cpp win32consolemodule.cpp Log Message: consolidation of more py3k-friendly changes from py3k branch Index: PyTime.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyTime.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** PyTime.cpp 3 Dec 2008 22:34:21 -0000 1.20 --- PyTime.cpp 4 Dec 2008 00:17:13 -0000 1.21 *************** *** 575,579 **** TCHAR resBuf[160]; wsprintf(resBuf, _T("<PyTime:%s %s>"), dateBuf, timeBuf); ! return PyString_FromTCHAR(resBuf); } --- 575,579 ---- TCHAR resBuf[160]; wsprintf(resBuf, _T("<PyTime:%s %s>"), dateBuf, timeBuf); ! return PyWinCoreString_FromString(resBuf); } Index: win32apimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** win32apimodule.cpp 29 Sep 2008 12:59:13 -0000 1.90 --- win32apimodule.cpp 4 Dec 2008 00:17:13 -0000 1.91 *************** *** 12,16 **** ******************************************************************/ - // #define UNICODE #include "PyWinTypes.h" #include "PyWinObjects.h" --- 12,15 ---- Index: win32consolemodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32consolemodule.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** win32consolemodule.cpp 3 Dec 2008 22:34:21 -0000 1.15 --- win32consolemodule.cpp 4 Dec 2008 00:17:13 -0000 1.16 *************** *** 211,215 **** return NULL; } ! return PyString_FromStringAndSize(buf,chars_printed); } --- 211,215 ---- return NULL; } ! return PyWinCoreString_FromString(buf,chars_printed); } *************** *** 359,363 **** return NULL; } ! return PyString_FromStringAndSize(buf,chars_printed); } --- 359,363 ---- return NULL; } ! return PyWinCoreString_FromString(buf,chars_printed); } *************** *** 747,751 **** return NULL; } ! return PyString_FromStringAndSize(buf,chars_printed); } --- 747,751 ---- return NULL; } ! return PyWinCoreString_FromString(buf,chars_printed); } Index: win32api_display.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32api_display.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** win32api_display.h 6 Feb 2008 18:42:51 -0000 1.3 --- win32api_display.h 4 Dec 2008 00:17:13 -0000 1.4 *************** *** 43,54 **** { public: - #ifdef _MSC_VER - #pragma warning( disable : 4251 ) - #endif // _MSC_VER static struct PyMemberDef members[]; static struct PyMethodDef methods[]; - #ifdef _MSC_VER - #pragma warning( default : 4251 ) - #endif // _MSC_VER static void deallocFunc(PyObject *ob); --- 43,48 ---- Index: PyWinTypesmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypesmodule.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** PyWinTypesmodule.cpp 13 Nov 2008 11:11:58 -0000 1.45 --- PyWinTypesmodule.cpp 4 Dec 2008 00:17:13 -0000 1.46 *************** *** 271,279 **** if (end>0 && (buf[end]==_T('\n') || buf[end]==_T('\r'))) buf[end]=_T('\0'); ! PyObject *obBuf = PyString_FromTCHAR(buf); if (free_buf && buf) ! LocalFree(buf); ! PyObject *v = Py_BuildValue("(isO)", errorCode, fnName, obBuf); ! Py_XDECREF(obBuf); if (v != NULL) { PyErr_SetObject(PyWinExc_ApiError, v); --- 271,281 ---- if (end>0 && (buf[end]==_T('\n') || buf[end]==_T('\r'))) buf[end]=_T('\0'); ! ! PyObject *v = Py_BuildValue("(iNN)", ! errorCode, ! PyWinCoreString_FromString(fnName), ! PyWinObject_FromTCHAR(buf)); if (free_buf && buf) ! LocalFree(buf); if (v != NULL) { PyErr_SetObject(PyWinExc_ApiError, v); Index: PyHANDLE.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyHANDLE.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** PyHANDLE.cpp 3 Dec 2008 22:34:21 -0000 1.17 --- PyHANDLE.cpp 4 Dec 2008 00:17:13 -0000 1.18 *************** *** 295,299 **** // ### - Double Ack - Always use the hack! //#ifdef _DEBUG ! PyObject *ob = PyString_FromTCHAR(resBuf); PyObject_Print(ob, fp, flags|Py_PRINT_RAW); Py_DECREF(ob); --- 295,299 ---- // ### - Double Ack - Always use the hack! //#ifdef _DEBUG ! PyObject *ob = PyWinCoreString_FromString(resBuf); PyObject_Print(ob, fp, flags|Py_PRINT_RAW); Py_DECREF(ob); Index: PyWinTypes.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** PyWinTypes.h 3 Dec 2008 22:34:21 -0000 1.54 --- PyWinTypes.h 4 Dec 2008 00:17:13 -0000 1.55 *************** *** 264,268 **** #endif } - #define PyString_FromTCHAR PyString_FromString #endif --- 264,267 ---- |
From: Mark H. <mha...@us...> - 2008-12-04 00:07:27
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12369/Pythonwin Modified Files: Tag: py3k win32dlg.cpp Log Message: merge minor consolidations from the trunk Index: win32dlg.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32dlg.cpp,v retrieving revision 1.10.2.1 retrieving revision 1.10.2.2 diff -C2 -d -r1.10.2.1 -r1.10.2.2 *** win32dlg.cpp 29 Aug 2008 05:53:29 -0000 1.10.2.1 --- win32dlg.cpp 4 Dec 2008 00:07:22 -0000 1.10.2.2 *************** *** 503,507 **** { PyObject *obList = NULL; ! // @pyparm <o PyDialogTemplate>|obList||A list of [<o PyDLGTEMPLATE>, <o PyDLGITEMTEMPLATE>, ...], which describe the dialog to be created. if (!PyArg_ParseTuple(args, "O:CreateDialogIndirect", &obList)) return NULL; --- 503,507 ---- { PyObject *obList = NULL; ! // @pyparm list|obList||A list of [<o PyDLGTEMPLATE>, <o PyDLGITEMTEMPLATE>, ...], which describe the dialog to be created. if (!PyArg_ParseTuple(args, "O:CreateDialogIndirect", &obList)) return NULL; |
From: Mark H. <mha...@us...> - 2008-12-04 00:07:26
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12369/win32/src Modified Files: Tag: py3k PyHANDLE.cpp PyTime.cpp PyWinTypesmodule.cpp win32clipboardmodule.cpp win32consolemodule.cpp win32rasmodule.cpp Log Message: merge minor consolidations from the trunk Index: win32rasmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32rasmodule.cpp,v retrieving revision 1.10.2.2 retrieving revision 1.10.2.3 diff -C2 -d -r1.10.2.2 -r1.10.2.3 *** win32rasmodule.cpp 2 Sep 2008 09:39:31 -0000 1.10.2.2 --- win32rasmodule.cpp 4 Dec 2008 00:07:22 -0000 1.10.2.3 *************** *** 64,81 **** _tcscpy(buf, _T("No error message is available")); /* strip trailing cr/lf */ ! /* Too much of a pain for unicode, it's just an error msg ! size_t end = strlen(buf)-1; ! if (end>1 && (buf[end-1]=='\n' || buf[end-1]=='\r')) ! buf[end-1] = '\0'; else ! if (end>0 && (buf[end]=='\n' || buf[end]=='\r')) ! buf[end]='\0'; ! */ PyObject *v = Py_BuildValue("(iNN)", errorCode, ! #if (PY_VERSION_HEX >= 0x03000000) ! PyUnicode_FromString(fnName), ! #else ! PyString_FromString(fnName), ! #endif PyWinObject_FromTCHAR(buf)); if (v != NULL) { --- 64,75 ---- _tcscpy(buf, _T("No error message is available")); /* strip trailing cr/lf */ ! size_t end = _tcslen(buf)-1; ! if (end>1 && (buf[end-1]==_T('\n') || buf[end-1]==_T('\r'))) ! buf[end-1] = 0; else ! if (end>0 && (buf[end]==_T('\n') || buf[end]==_T('\r'))) ! buf[end]=0; PyObject *v = Py_BuildValue("(iNN)", errorCode, ! PyWinCoreString_FromString(fnName), PyWinObject_FromTCHAR(buf)); if (v != NULL) { *************** *** 583,587 **** pCon = &tc; } ! PyObject *ret = PyTuple_New(noConns); if (ret==NULL) return NULL; --- 577,581 ---- pCon = &tc; } ! PyObject *ret = PyList_New(noConns); if (ret==NULL) return NULL; *************** *** 598,602 **** break; } ! PyTuple_SET_ITEM(ret, i, item); } // @rdesc Each tuple is of format (handle, entryName, deviceType, deviceName) --- 592,596 ---- break; } ! PyList_SET_ITEM(ret, i, item); } // @rdesc Each tuple is of format (handle, entryName, deviceType, deviceName) Index: PyTime.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyTime.cpp,v retrieving revision 1.19.2.1 retrieving revision 1.19.2.2 diff -C2 -d -r1.19.2.1 -r1.19.2.2 *** PyTime.cpp 29 Aug 2008 04:59:25 -0000 1.19.2.1 --- PyTime.cpp 4 Dec 2008 00:07:22 -0000 1.19.2.2 *************** *** 640,649 **** TCHAR resBuf[160]; wsprintf(resBuf, _T("<PyTime:%s %s>"), dateBuf, timeBuf); ! #if (PY_VERSION_HEX < 0x03000000) ! return PyString_FromTCHAR(resBuf); ! #else ! // Py3k requires that Unicode is returned ! return PyWinObject_FromWCHAR(resBuf); ! #endif } --- 640,644 ---- TCHAR resBuf[160]; wsprintf(resBuf, _T("<PyTime:%s %s>"), dateBuf, timeBuf); ! return PyWinCoreString_FromString(resBuf); } Index: win32consolemodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32consolemodule.cpp,v retrieving revision 1.13.2.2 retrieving revision 1.13.2.3 diff -C2 -d -r1.13.2.2 -r1.13.2.3 *** win32consolemodule.cpp 7 Oct 2008 15:28:49 -0000 1.13.2.2 --- win32consolemodule.cpp 4 Dec 2008 00:07:22 -0000 1.13.2.3 *************** *** 211,219 **** return NULL; } ! #if (PY_VERSION_HEX < 0x03000000) ! return PyString_FromStringAndSize(buf,chars_printed); ! #else ! return PyUnicode_FromString(buf); ! #endif } --- 211,215 ---- return NULL; } ! return PyWinCoreString_FromString(buf,chars_printed); } *************** *** 363,371 **** return NULL; } ! #if (PY_VERSION_HEX < 0x03000000) ! return PyString_FromStringAndSize(buf,chars_printed); ! #else ! return PyUnicode_FromString(buf); ! #endif } --- 359,363 ---- return NULL; } ! return PyWinCoreString_FromString(buf,chars_printed); } *************** *** 755,763 **** return NULL; } ! #if (PY_VERSION_HEX < 0x03000000) ! return PyString_FromStringAndSize(buf,chars_printed); ! #else ! return PyUnicode_FromString(buf); ! #endif } --- 747,751 ---- return NULL; } ! return PyWinCoreString_FromString(buf,chars_printed); } Index: win32clipboardmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32clipboardmodule.cpp,v retrieving revision 1.23.2.2 retrieving revision 1.23.2.3 diff -C2 -d -r1.23.2.2 -r1.23.2.3 *** win32clipboardmodule.cpp 26 Nov 2008 07:17:39 -0000 1.23.2.2 --- win32clipboardmodule.cpp 4 Dec 2008 00:07:22 -0000 1.23.2.3 *************** *** 481,485 **** return NULL; if (!PyWinObject_AsHANDLE(obhglobal, &hglobal)) ! return NULL; size_t size = GlobalSize(hglobal); if (!size) --- 481,485 ---- return NULL; if (!PyWinObject_AsHANDLE(obhglobal, &hglobal)) ! return NULL; size_t size = GlobalSize(hglobal); if (!size) *************** *** 903,907 **** bufSize++; // size doesnt include nulls! // else assume buffer needs no terminator... ! } handle = GlobalAlloc(GHND, bufSize); if (handle == NULL) { --- 903,907 ---- bufSize++; // size doesnt include nulls! // else assume buffer needs no terminator... ! } handle = GlobalAlloc(GHND, bufSize); if (handle == NULL) { *************** *** 918,921 **** --- 918,922 ---- if (!data) + // XXX - should we GlobalFree the mem? return ReturnAPIError("SetClipboardData"); return PyWinLong_FromHANDLE(data); Index: PyWinTypesmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypesmodule.cpp,v retrieving revision 1.39.2.9 retrieving revision 1.39.2.10 diff -C2 -d -r1.39.2.9 -r1.39.2.10 *** PyWinTypesmodule.cpp 11 Nov 2008 00:39:36 -0000 1.39.2.9 --- PyWinTypesmodule.cpp 4 Dec 2008 00:07:22 -0000 1.39.2.10 *************** *** 326,334 **** PyObject *v = Py_BuildValue("(iNN)", errorCode, ! #if (PY_VERSION_HEX >= 0x03000000) ! PyUnicode_FromString(fnName), ! #else ! PyString_FromString(fnName), ! #endif PyWinObject_FromTCHAR(buf)); if (free_buf && buf) --- 326,330 ---- PyObject *v = Py_BuildValue("(iNN)", errorCode, ! PyWinCoreString_FromString(fnName), PyWinObject_FromTCHAR(buf)); if (free_buf && buf) Index: PyHANDLE.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyHANDLE.cpp,v retrieving revision 1.16.2.4 retrieving revision 1.16.2.5 diff -C2 -d -r1.16.2.4 -r1.16.2.5 *** PyHANDLE.cpp 5 Oct 2008 19:54:04 -0000 1.16.2.4 --- PyHANDLE.cpp 4 Dec 2008 00:07:22 -0000 1.16.2.5 *************** *** 322,327 **** int PyHANDLE::print(FILE *fp, int flags) { ! WCHAR resBuf[160]; ! wsprintfW(resBuf, L"<%hs at %Id (%Id)>", GetTypeName(), this, m_handle); // ### ACK! Python uses a non-debug runtime. We can't use stream // ### functions when in DEBUG mode!! (we link against a different --- 322,327 ---- int PyHANDLE::print(FILE *fp, int flags) { ! TCHAR resBuf[160]; ! wsprintf(resBuf, _T("<%hs at %Id (%Id)>"), GetTypeName(), this, m_handle); // ### ACK! Python uses a non-debug runtime. We can't use stream // ### functions when in DEBUG mode!! (we link against a different *************** *** 330,334 **** // ### - Double Ack - Always use the hack! //#ifdef _DEBUG ! PyObject *ob = PyUnicode_FromWideChar(resBuf, wcslen(resBuf)); PyObject_Print(ob, fp, flags|Py_PRINT_RAW); Py_DECREF(ob); --- 330,334 ---- // ### - Double Ack - Always use the hack! //#ifdef _DEBUG ! PyObject *ob = PyWinCoreString_FromString(resBuf); PyObject_Print(ob, fp, flags|Py_PRINT_RAW); Py_DECREF(ob); |
From: Mark H. <mha...@us...> - 2008-12-04 00:07:26
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12369/com/win32com/src Modified Files: Tag: py3k PyIBase.cpp Log Message: merge minor consolidations from the trunk Index: PyIBase.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PyIBase.cpp,v retrieving revision 1.7.4.1 retrieving revision 1.7.4.2 diff -C2 -d -r1.7.4.1 -r1.7.4.2 *** PyIBase.cpp 29 Aug 2008 08:27:37 -0000 1.7.4.1 --- PyIBase.cpp 4 Dec 2008 00:07:22 -0000 1.7.4.2 *************** *** 68,72 **** TCHAR buf[80]; wsprintf(buf, _T("<%hs at %p>"),ob_type->tp_name, (PyObject *)this); ! return PyWinObject_FromTCHAR(buf); } --- 68,72 ---- TCHAR buf[80]; wsprintf(buf, _T("<%hs at %p>"),ob_type->tp_name, (PyObject *)this); ! return PyWinCoreString_FromString(buf); } |
From: Mark H. <mha...@us...> - 2008-12-04 00:07:26
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12369/com/win32comext/shell/src Modified Files: Tag: py3k shell.cpp Log Message: merge minor consolidations from the trunk Index: shell.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/shell.cpp,v retrieving revision 1.68.2.4 retrieving revision 1.68.2.5 diff -C2 -d -r1.68.2.4 -r1.68.2.5 *** shell.cpp 24 Nov 2008 06:14:33 -0000 1.68.2.4 --- shell.cpp 4 Dec 2008 00:07:22 -0000 1.68.2.5 *************** *** 2482,2486 **** // @pymethod bool|shell|IsUserAnAdmin|Tests whether the current user is a member of the Administrator's group. ! // @rdesc The result is true or false. static PyObject *PyIsUserAnAdmin(PyObject *self, PyObject *args) { --- 2482,2486 ---- // @pymethod bool|shell|IsUserAnAdmin|Tests whether the current user is a member of the Administrator's group. ! // @rdesc The result is true or false, or a com_error with E_NOTIMPL is raised. static PyObject *PyIsUserAnAdmin(PyObject *self, PyObject *args) { *************** *** 3285,3295 **** PYCOM_INTERFACE_CLIENT_ONLY(NameSpaceTreeControl), PYCOM_INTERFACE_FULL(ExplorerCommand), ! PYCOM_INTERFACE_FULL(CopyHookA), ! PYCOM_INTERFACE_FULL(CopyHookW), ! // For b/w compat, Add IID_ICopyHook as IID_CopyHookA ! { &IID_ICopyHookA, "ICopyHook", "IID_ICopyHook", NULL, NULL }, ! PYCOM_INTERFACE_IID_ONLY(ShellCopyHookA), ! PYCOM_INTERFACE_IID_ONLY(ShellCopyHookW), ! PYCOM_INTERFACE_IID_ONLY(ShellCopyHook), PYCOM_INTERFACE_FULL(ShellItem), PYCOM_INTERFACE_FULL(ShellItemArray), --- 3285,3295 ---- PYCOM_INTERFACE_CLIENT_ONLY(NameSpaceTreeControl), PYCOM_INTERFACE_FULL(ExplorerCommand), ! PYCOM_INTERFACE_FULL(CopyHookA), ! PYCOM_INTERFACE_FULL(CopyHookW), ! // For b/w compat, Add IID_ICopyHook as IID_CopyHookA ! { &IID_ICopyHookA, "ICopyHook", "IID_ICopyHook", NULL, NULL }, ! PYCOM_INTERFACE_IID_ONLY(ShellCopyHookA), ! PYCOM_INTERFACE_IID_ONLY(ShellCopyHookW), ! PYCOM_INTERFACE_IID_ONLY(ShellCopyHook), PYCOM_INTERFACE_FULL(ShellItem), PYCOM_INTERFACE_FULL(ShellItemArray), |