pywin32-checkins Mailing List for Python for Windows Extensions (Page 14)
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: Vernon C. <kf...@us...> - 2010-05-03 08:41:18
|
Update of /cvsroot/pywin32/pywin32/adodbapi In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv16339/adodbapi Modified Files: adodbapi.py Log Message: add adodbapi user-submitted patches, update change.txt Index: adodbapi.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/adodbapi/adodbapi.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** adodbapi.py 3 May 2010 05:40:33 -0000 1.10 --- adodbapi.py 3 May 2010 08:41:06 -0000 1.11 *************** *** 432,439 **** self.paramstyle = paramstyle self.supportsTransactions=False ! for indx in range(adoConn.Properties.Count): ! name = getIndexedValue(adoConn.Properties,indx).Name ! if name == 'Transaction DDL': ! if getIndexedValue(adoConn.Properties,indx).Value != 0: #v2.1 Albrecht self.supportsTransactions=True break --- 432,438 ---- self.paramstyle = paramstyle self.supportsTransactions=False ! for property in adoConn.Properties: #Rod Mancisidor ( mancisidor ) ! if property.Name == 'Transaction DDL': ! if property.Value != 0: #v2.1 Albrecht self.supportsTransactions=True break *************** *** 1186,1194 **** try: return f(variant) ! except (ValueError,TypeError): try: europeVsUS = str(variant).replace(",",".") return f(europeVsUS) ! except (ValueError,TypeError): pass --- 1185,1193 ---- try: return f(variant) ! except (ValueError,TypeError,decimal.InvalidOperation): try: europeVsUS = str(variant).replace(",",".") return f(europeVsUS) ! except (ValueError,TypeError,decimal.InvalidOperation): pass |
From: Vernon C. <kf...@us...> - 2010-05-03 05:40:42
|
Update of /cvsroot/pywin32/pywin32/adodbapi/tests In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv23004/tests Modified Files: RunTests.bat adodbapitest.py adodbapitestconfig.py Log Message: adodbapi v2.3 django compatible version Index: adodbapitest.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/adodbapi/tests/adodbapitest.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** adodbapitest.py 14 Feb 2009 15:13:52 -0000 1.10 --- adodbapitest.py 3 May 2010 05:40:33 -0000 1.11 *************** *** 1,8 **** ! """ Unit tests for adodbapi version 2.2.6 (d)""" """ adodbapi - A python DB API 2.0 interface to Microsoft ADO Copyright (C) 2002 Henrik Ekelund - Email: <http://sourceforge.net/sendmessage.php?touser=618411> This library is free software; you can redistribute it and/or --- 1,7 ---- ! """ Unit tests for adodbapi version 2.3.0""" """ adodbapi - A python DB API 2.0 interface to Microsoft ADO Copyright (C) 2002 Henrik Ekelund This library is free software; you can redistribute it and/or *************** *** 20,25 **** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! Updated for decimal data and version 2.1 by Vernon Cole ! AS400 tests removed v 2.1.1 - Vernon Cole """ --- 19,23 ---- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ! Updates by Vernon Cole """ *************** *** 33,38 **** win32 = False ! import adodbapitestconfig #will find (parent?) adodbpai import adodbapi #adodbapi.adodbapi.verbose = 3 --- 31,37 ---- win32 = False ! import adodbapitestconfig #will find (parent?) adodbapi import adodbapi + import ado_consts #adodbapi.adodbapi.verbose = 3 *************** *** 131,159 **** def testUserDefinedConversions(self): - oldconverter=adodbapi.variantConversions[adodbapi.adoStringTypes] ! try: ! duplicatingConverter=lambda aStringField: aStringField*2 ! assert duplicatingConverter(u'gabba') == u'gabbagabba' ! adodbapi.variantConversions[adodbapi.adoStringTypes]=duplicatingConverter ! self.helpForceDropOnTblTemp() ! conn=self.getConnection() - crsr=conn.cursor() - tabdef = "CREATE TABLE tblTemp (fldData VARCHAR(100) NOT NULL)" - crsr.execute(tabdef) - crsr.execute("INSERT INTO tblTemp(fldData) VALUES('gabba')") - crsr.execute("INSERT INTO tblTemp(fldData) VALUES('hey')") - crsr.execute("SELECT fldData FROM tblTemp ORDER BY fldData") - row=crsr.fetchone() - self.assertEquals(row[0],'gabbagabba') - row=crsr.fetchone() - self.assertEquals(row[0],'heyhey') - finally: - adodbapi.variantConversions[adodbapi.adoStringTypes]=oldconverter #Restore - self.helpRollbackTblTemp() - def helpTestDataType(self,sqlDataTypeString, DBAPIDataTypeString, --- 130,157 ---- def testUserDefinedConversions(self): oldconverter=adodbapi.variantConversions[adodbapi.adoStringTypes] ! #try: ! duplicatingConverter=lambda aStringField: aStringField*2 ! assert duplicatingConverter(u'gabba') == u'gabbagabba' ! adodbapi.variantConversions[adodbapi.adoStringTypes]=duplicatingConverter ! self.helpForceDropOnTblTemp() ! conn=self.getConnection() ! ! crsr=conn.cursor() ! tabdef = "CREATE TABLE tblTemp (fldData VARCHAR(100) NOT NULL)" ! crsr.execute(tabdef) ! crsr.execute("INSERT INTO tblTemp(fldData) VALUES('gabba')") ! crsr.execute("INSERT INTO tblTemp(fldData) VALUES('hey')") ! crsr.execute("SELECT fldData FROM tblTemp ORDER BY fldData") ! row=crsr.fetchone() ! self.assertEquals(row[0],'gabbagabba') ! row=crsr.fetchone() ! self.assertEquals(row[0],'heyhey') ! #finally: ! adodbapi.variantConversions[adodbapi.adoStringTypes]=oldconverter #Restore ! self.helpRollbackTblTemp() def helpTestDataType(self,sqlDataTypeString, DBAPIDataTypeString, *************** *** 226,230 **** elif compareAlmostEqual: assert abs(rs[0]-pyData)/pyData<0.00001, \ ! "Values not almost equal rs[0]=%s, oyDta=%f" %(rs[0],pyData) else: if allowedReturnValues: --- 224,228 ---- elif compareAlmostEqual: assert abs(rs[0]-pyData)/pyData<0.00001, \ ! "Values not almost equal rs[0]=%s, pyData=%f" %(rs[0],pyData) else: if allowedReturnValues: *************** *** 235,244 **** assert ok else: ! self.assertEquals(rs[0] , pyData) ! self.helpRollbackTblTemp() ! def testDataTypeFloat(self): ! self.helpTestDataType("real",'NUMBER',3.45,compareAlmostEqual=1) ! self.helpTestDataType("float",'NUMBER',1.79e37,compareAlmostEqual=1) def testDataTypeMoney(self): #v2.1 Cole -- use decimal for money --- 233,242 ---- assert ok else: ! self.assertEquals(rs[0] , pyData, \ ! 'Values are not equal rs[0]="%s", pyData="%s"' %(rs[0],pyData)) ! def testDataTypeFloat(self): ! self.helpTestDataType("real",'NUMBER',3.45,compareAlmostEqual=True) ! self.helpTestDataType("float",'NUMBER',1.79e37,compareAlmostEqual=True) def testDataTypeMoney(self): #v2.1 Cole -- use decimal for money *************** *** 277,284 **** def testDataTypeBinary(self): if self.getEngine() == 'MySQL': ! pass #self.helpTestDataType("BLOB",'BINARY',adodbapi.Binary('\x00\x01\xE2\x40')) else: - binfld = str2bytes('\x00\x01\xE2\x40') self.helpTestDataType("binary(4)",'BINARY',adodbapi.Binary(binfld)) self.helpTestDataType("varbinary(100)",'BINARY',adodbapi.Binary(binfld)) --- 275,282 ---- def testDataTypeBinary(self): + binfld = str2bytes('\x00\x01\xE2\x40') if self.getEngine() == 'MySQL': ! pass # self.helpTestDataType("BLOB(4)",'BINARY',adodbapi.Binary(binfld)) else: self.helpTestDataType("binary(4)",'BINARY',adodbapi.Binary(binfld)) self.helpTestDataType("varbinary(100)",'BINARY',adodbapi.Binary(binfld)) *************** *** 294,298 **** def helpForceDropOnTblTemp(self): conn=self.getConnection() ! crsr=conn.cursor() try: crsr.execute("DELETE FROM tblTemp") --- 292,296 ---- def helpForceDropOnTblTemp(self): conn=self.getConnection() ! crsr=conn.cursor() try: crsr.execute("DELETE FROM tblTemp") *************** *** 301,306 **** --- 299,307 ---- except: pass + #finally: + crsr.close() def helpCreateAndPopulateTableTemp(self,crsr): + self.helpForceDropOnTblTemp() tabdef= """ CREATE TABLE tblTemp ( *************** *** 309,314 **** """ crsr.execute(tabdef) ! for i in range(9): crsr.execute("INSERT INTO tblTemp (fldData) VALUES (%i)" %(i,)) def testFetchAll(self): --- 310,316 ---- """ crsr.execute(tabdef) ! for i in range(9): # note: this poor SQL code, but a valid test crsr.execute("INSERT INTO tblTemp (fldData) VALUES (%i)" %(i,)) + # better to use ("INSERT INTO tblTemp (fldData) VALUES (?)",(i,)) def testFetchAll(self): *************** *** 320,323 **** --- 322,333 ---- self.helpRollbackTblTemp() + def testIterator(self): + crsr=self.getCursor() + self.helpCreateAndPopulateTableTemp(crsr) + crsr.execute("SELECT fldData FROM tblTemp") + for i,row in enumerate(crsr): + assert row[0]==i + self.helpRollbackTblTemp() + def testExecuteMany(self): crsr=self.getCursor() *************** *** 400,403 **** --- 410,414 ---- conn=self.getConnection() crsr=conn.cursor() + self.helpForceDropOnTblTemp() crsr.execute(tabdef) for multiplier in (1,decimal.Decimal('2.5'),78,9999,99999,7007): *************** *** 414,419 **** def testErrorConnect(self): ! self.assertRaises(adodbapi.DatabaseError,adodbapi.connect,'not a valid connect string') class TestADOwithSQLServer(CommonDBTests): def setUp(self): --- 425,488 ---- def testErrorConnect(self): ! self.assertRaises(adodbapi.DatabaseError,adodbapi.connect,'not a valid connect string') ! ! def testFormatParamstyle(self): ! self.helpForceDropOnTblTemp() ! conn=self.getConnection() ! conn.paramstyle = 'format' #test nonstandard use of paramstyle ! crsr=conn.cursor() ! tabdef= """ ! CREATE TABLE tblTemp ( ! fldId integer NOT NULL, ! fldData varchar(10)) ! """ ! crsr.execute(tabdef) ! ! inputs = [u'one',u'two',u'three'] ! fldId=2 ! for inParam in inputs: ! fldId+=1 ! try: ! crsr.execute("INSERT INTO tblTemp (fldId,fldData) VALUES (%s,%s)", (fldId,inParam)) ! except: ! conn.printADOerrors() ! raise ! crsr.execute("SELECT fldData FROM tblTemp WHERE %s=fldID", [fldId]) ! rec = crsr.fetchone() ! assert rec[0]==inParam, 'returned value:"%s" != test value:"%s"'%(rec[0],inParam) ! crsr.execute("insert into tblTemp (fldId,fldData) VALUES (%s,'four%sfive')",(20,)) ! crsr.execute("SELECT fldData FROM tblTemp WHERE fldID=20") ! rec = crsr.fetchone() ! assert rec[0]=='four%sfive' ! ! def testNamedParamstyle(self): ! self.helpForceDropOnTblTemp() ! conn=self.getConnection() ! crsr=conn.cursor() ! crsr.paramstyle = 'named' #test nonstandard use of paramstyle ! tabdef= """ ! CREATE TABLE tblTemp ( ! fldId integer NOT NULL, ! fldData varchar(10)) ! """ ! crsr.execute(tabdef) + inputs = [u'four',u'five',u'six'] + fldId=3 + for inParam in inputs: + fldId+=1 + try: + crsr.execute("INSERT INTO tblTemp (fldId,fldData) VALUES (:Id,:f_Val)", {"f_Val":inParam,'Id':fldId}) + except: + conn.printADOerrors() + raise + crsr.execute("SELECT fldData FROM tblTemp WHERE :Id=fldID", {'Id':fldId}) + rec = crsr.fetchone() + assert rec[0]==inParam, 'returned value:"%s" != test value:"%s"'%(rec[0],inParam) + crsr.execute("insert into tblTemp (fldId,fldData) VALUES (:xyz,'six:five')",{'xyz':30}) + crsr.execute("SELECT fldData FROM tblTemp WHERE fldID=30") + rec = crsr.fetchone() + assert rec[0]=='six:five' + class TestADOwithSQLServer(CommonDBTests): def setUp(self): *************** *** 444,466 **** # variantConversions is a dictionary of convertion functions # held internally in adodbapi - - # By default decimal and numbers are returned as decimals. - # Instead, make them return as floats ! oldconverter = adodbapi.variantConversions[adodbapi.adNumeric] #keep old function to restore later ! adodbapi.variantConversions[adodbapi.adNumeric] = adodbapi.cvtFloat self.helpTestDataType("decimal(18,2)",'NUMBER',3.45,compareAlmostEqual=1) self.helpTestDataType("numeric(18,2)",'NUMBER',3.45,compareAlmostEqual=1) # now return strings ! adodbapi.variantConversions[adodbapi.adNumeric] = adodbapi.cvtString self.helpTestDataType("numeric(18,2)",'NUMBER','3.45') # now a completly weird user defined convertion ! adodbapi.variantConversions[adodbapi.adNumeric] = lambda x: u'!!This function returns a funny unicode string %s!!'%x self.helpTestDataType("numeric(18,2)",'NUMBER','3.45', allowedReturnValues=[u'!!This function returns a funny unicode string 3.45!!']) # now reset the converter to its original function ! adodbapi.variantConversions[adodbapi.adNumeric]=oldconverter #Restore the original convertion function self.helpTestDataType("numeric(18,2)",'NUMBER',decimal.Decimal('3.45')) --- 513,535 ---- # variantConversions is a dictionary of convertion functions # held internally in adodbapi ! oldconverter = adodbapi.variantConversions[ado_consts.adNumeric] #keep old function to restore later ! ! # By default decimal and "numbers" are returned as decimals. ! # Instead, make numbers return as floats ! adodbapi.variantConversions[ado_consts.adNumeric] = adodbapi.cvtFloat self.helpTestDataType("decimal(18,2)",'NUMBER',3.45,compareAlmostEqual=1) self.helpTestDataType("numeric(18,2)",'NUMBER',3.45,compareAlmostEqual=1) # now return strings ! adodbapi.variantConversions[ado_consts.adNumeric] = adodbapi.cvtString self.helpTestDataType("numeric(18,2)",'NUMBER','3.45') # now a completly weird user defined convertion ! adodbapi.variantConversions[ado_consts.adNumeric] = lambda x: u'!!This function returns a funny unicode string %s!!'%x self.helpTestDataType("numeric(18,2)",'NUMBER','3.45', allowedReturnValues=[u'!!This function returns a funny unicode string 3.45!!']) # now reset the converter to its original function ! adodbapi.variantConversions[ado_consts.adNumeric]=oldconverter #Restore the original convertion function self.helpTestDataType("numeric(18,2)",'NUMBER',decimal.Decimal('3.45')) *************** *** 484,493 **** retvalues=crsr.callproc('sp_DeleteMeOnlyForTesting',('Dodsworth','Anne',' ')) ! assert retvalues[0]=='Dodsworth' ! assert retvalues[1]=='Anne' ! assert retvalues[2]=='DodsworthAnne' self.conn.rollback() ! ! def testMultipleSetReturn(self): crsr=self.getCursor() --- 553,561 ---- retvalues=crsr.callproc('sp_DeleteMeOnlyForTesting',('Dodsworth','Anne',' ')) ! assert retvalues[0]=='Dodsworth', '%s is not "Dodsworth"'%repr(retvalues[0]) ! assert retvalues[1]=='Anne','%s is not "Anne"'%repr(retvalues[1]) ! assert retvalues[2]=='DodsworthAnne','%s is not "DodsworthAnne"'%repr(retvalues[2]) self.conn.rollback() ! def testMultipleSetReturn(self): crsr=self.getCursor() *************** *** 586,590 **** c=adodbapi.connect(adodbapitestconfig.connStrMySql) assert c != None ! class TimeConverterInterfaceTest(unittest.TestCase): def testIDate(self): --- 654,681 ---- c=adodbapi.connect(adodbapitestconfig.connStrMySql) assert c != None ! ! class TestADOwithPostgres(CommonDBTests): ! def setUp(self): ! self.conn = adodbapi.connect(adodbapitestconfig.connStrPostgres) ! self.engine = 'PostgreSQL' ! ! def tearDown(self): ! try: ! self.conn.rollback() ! except: ! pass ! try: ! self.conn.close() ! except: ! pass ! self.conn=None ! ! def getConnection(self): ! return self.conn ! ! def testOkConnect(self): ! c=adodbapi.connect(adodbapitestconfig.connStrPostgres) ! assert c != None ! class TimeConverterInterfaceTest(unittest.TestCase): def testIDate(self): *************** *** 738,742 **** if adodbapitestconfig.doMySqlTest: suites.append( unittest.makeSuite(TestADOwithMySql,'test')) ! suite=unittest.TestSuite(suites) if __name__ == '__main__': --- 829,835 ---- if adodbapitestconfig.doMySqlTest: suites.append( unittest.makeSuite(TestADOwithMySql,'test')) ! if adodbapitestconfig.doPostgresTest: ! suites.append( unittest.makeSuite(TestADOwithPostgres,'test')) ! suite=unittest.TestSuite(suites) if __name__ == '__main__': *************** *** 756,758 **** print adodbapi.dateconverter unittest.TextTestRunner().run(suite) - \ No newline at end of file --- 849,850 ---- Index: RunTests.bat =================================================================== RCS file: /cvsroot/pywin32/pywin32/adodbapi/tests/RunTests.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RunTests.bat 6 Feb 2009 03:35:11 -0000 1.3 --- RunTests.bat 3 May 2010 05:40:33 -0000 1.4 *************** *** 1,2 **** --- 1,5 ---- + if "%1"=="" goto skip_arg + set PYTHON=%1 + :skip_arg if not "%PYTHON%"=="" goto skip_python set PYTHON=python Index: adodbapitestconfig.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/adodbapi/tests/adodbapitestconfig.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** adodbapitestconfig.py 14 Feb 2009 15:13:52 -0000 1.8 --- adodbapitestconfig.py 3 May 2010 05:40:34 -0000 1.9 *************** *** 1,4 **** # Configure this in order to run the testcases. ! "adodbapitestconfig.py v 2.2.6" import os --- 1,4 ---- # Configure this in order to run the testcases. ! "adodbapitestconfig.py v 2.3.0" import os *************** *** 20,26 **** print __doc__ ! doAccessTest = True ! doSqlServerTest = True ! doMySqlTest = True try: #If mx extensions are installed, use mxDateTime --- 20,28 ---- print __doc__ ! doAllTests = True ! doAccessTest = True or doAllTests ! doSqlServerTest = False or doAllTests ! doMySqlTest = False or doAllTests ! doPostgresTest = False # or doAllTests try: #If mx extensions are installed, use mxDateTime *************** *** 31,39 **** doDateTimeTest=True #Requires Python 2.3 Alpha2 ! iterateOverTimeTests=True if doAccessTest: ! _accessdatasource = None #set to None for automatic creation ! #r"C:\Program Files\Microsoft Office\Office\Samples\northwind.mdb;" if _accessdatasource == None: # following setup code borrowed from pywin32 odbc test suite --- 33,42 ---- doDateTimeTest=True #Requires Python 2.3 Alpha2 ! iterateOverTimeTests = False or doAllTests if doAccessTest: ! _accessdatasource = "test.mdb" #set to None for automatic creation ! if not os.access(_accessdatasource,os.F_OK): ! _accessdatasource = None if _accessdatasource == None: # following setup code borrowed from pywin32 odbc test suite *************** *** 47,51 **** except ImportError: #perhaps we are running IronPython win32 = False ! if not win32: from System import Activator, Type _accessdatasource = os.path.join(tempfile.gettempdir(), "test_odbc.mdb") --- 50,54 ---- except ImportError: #perhaps we are running IronPython win32 = False ! if not win32: #iron Python from System import Activator, Type _accessdatasource = os.path.join(tempfile.gettempdir(), "test_odbc.mdb") *************** *** 94,98 **** if doMySqlTest: ! _computername='192.168.1.1' _databasename='test' _username = 'Test' --- 97,105 ---- if doMySqlTest: ! import socket ! try: ! _computername = socket.gethostbyname('kf7xm.ham-radio-op.net') ! except: ! _computername = '127.0.0.1' _databasename='test' _username = 'Test' *************** *** 108,109 **** --- 115,136 ---- print inst.args[0] # should be the error message doMySqlTest = False + + if doPostgresTest: + import socket + try: + _computername = socket.gethostbyname('kf7xm.ham-radio-op.net') + except: + _computername = '127.0.0.1' + _databasename='test' + _username = 'Test' + _password = '12345678' + _driver="PostgreSQL Unicode" + connStrPostgres = 'Driver={%s};Server=%s;Database=%s;user=%s;password=%s;' % \ + (_driver,_computername,_databasename,_username,_password) + print ' ...Testing PostgreSQL login...' + try: + s = adodbapi.connect(connStrPostgres) #connect to server + s.close() + except adodbapi.DatabaseError, inst: + print inst.args[0] # should be the error message + doPostgresTest = False |
From: Vernon C. <kf...@us...> - 2010-05-03 05:40:41
|
Update of /cvsroot/pywin32/pywin32/adodbapi In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv23004 Modified Files: adodbapi.py readme.txt Added Files: ado_consts.py Log Message: adodbapi v2.3 django compatible version Index: adodbapi.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/adodbapi/adodbapi.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** adodbapi.py 6 Feb 2009 03:51:25 -0000 1.9 --- adodbapi.py 3 May 2010 05:40:33 -0000 1.10 *************** *** 1,6 **** ! """adodbapi v2.2.6 - A python DB API 2.0 interface to Microsoft ADO ! ! Copyright (C) 2002 Henrik Ekelund ! Email: <http://sourceforge.net/sendmessage.php?touser=618411> This library is free software; you can redistribute it and/or --- 1,7 ---- ! """adodbapi - A python DB API 2.0 (PEP 249) interface to Microsoft ADO ! ! Copyright (C) 2002 Henrik Ekelund, version 2.1 by Vernon Cole [...2069 lines suppressed...] *************** *** 1299,1307 **** adoDateTimeTypes : variantConvertDate, adoApproximateNumericTypes: cvtFloat, ! adCurrency: cvtNumeric, ! adoExactNumericTypes: cvtNumeric, # use cvtNumeric to force decimal rather than unicode ! adoLongTypes : long, # will by altered by 2to3 to ': int' ! adoIntegerTypes: int, ! adoRowIdTypes: int, adoStringTypes: identity, adoBinaryTypes: cvtBuffer, --- 1240,1247 ---- adoDateTimeTypes : variantConvertDate, adoApproximateNumericTypes: cvtFloat, ! adoExactNumericTypes: cvtDecimal, # use to force decimal rather than unicode ! adoLongTypes : cvtLong, ! adoIntegerTypes: cvtInt, ! adoRowIdTypes: cvtInt, adoStringTypes: identity, adoBinaryTypes: cvtBuffer, --- NEW FILE: ado_consts.py --- # ADO enumerated constants documented on MSDN: # http://msdn.microsoft.com/en-us/library/ms678353(VS.85).aspx # IsolationLevelEnum adXactUnspecified = -1 adXactBrowse = 0x100 adXactChaos = 0x10 adXactCursorStability = 0x1000 adXactIsolated = 0x100000 adXactReadCommitted = 0x1000 adXactReadUncommitted = 0x100 adXactRepeatableRead = 0x10000 adXactSerializable = 0x100000 # CursorLocationEnum adUseClient = 3 adUseServer = 2 # CursorTypeEnum adOpenDynamic = 2 adOpenForwardOnly = 0 adOpenKeyset = 1 adOpenStatic = 3 adOpenUnspecified = -1 # CommandTypeEnum adCmdText = 1 adCmdStoredProc = 4 # ParameterDirectionEnum adParamInput = 1 adParamInputOutput = 3 adParamOutput = 2 adParamReturnValue = 4 adParamUnknown = 0 directions = { 0: 'Unknown', 1: 'Input', 2: 'Output', 3: 'InputOutput', 4: 'Return', } def ado_direction_name(ado_dir): try: return 'adParam' + directions[ado_dir] except: return 'unknown direction ('+str(ado_dir)+')' # ObjectStateEnum adStateClosed = 0 adStateOpen = 1 adStateConnecting = 2 adStateExecuting = 4 adStateFetching = 8 # FieldAttributeEnum adFldMayBeNull = 0x40 # ConnectModeEnum adModeUnknown = 0 adModeRead = 1 adModeWrite = 2 adModeReadWrite = 3 adModeShareDenyRead = 4 adModeShareDenyWrite = 8 adModeShareExclusive = 12 adModeShareDenyNone = 16 adModeRecursive = 0x400000 # XactAttributeEnum adXactCommitRetaining = 131072 adXactAbortRetaining = 262144 ado_error_TIMEOUT = -2147217871 # DataTypeEnum - ADO Data types documented at: # http://msdn2.microsoft.com/en-us/library/ms675318.aspx adArray = 0x2000 adEmpty = 0x0 adBSTR = 0x8 adBigInt = 0x14 adBinary = 0x80 adBoolean = 0xb adChapter = 0x88 adChar = 0x81 adCurrency = 0x6 adDBDate = 0x85 adDBTime = 0x86 adDBTimeStamp = 0x87 adDate = 0x7 adDecimal = 0xe adDouble = 0x5 adError = 0xa adFileTime = 0x40 adGUID = 0x48 adIDispatch = 0x9 adIUnknown = 0xd adInteger = 0x3 adLongVarBinary = 0xcd adLongVarChar = 0xc9 adLongVarWChar = 0xcb adNumeric = 0x83 adPropVariant = 0x8a adSingle = 0x4 adSmallInt = 0x2 adTinyInt = 0x10 adUnsignedBigInt = 0x15 adUnsignedInt = 0x13 adUnsignedSmallInt = 0x12 adUnsignedTinyInt = 0x11 adUserDefined = 0x84 adVarBinary = 0xCC adVarChar = 0xC8 adVarNumeric = 0x8B adVarWChar = 0xCA adVariant = 0xC adWChar = 0x82 # Additional constants used by introspection but not ADO itself AUTO_FIELD_MARKER = -1000 adTypeNames = { adBSTR: 'adBSTR', adBigInt: 'adBigInt', adBinary: 'adBinary', adBoolean: 'adBoolean', adChapter: 'adChapter', adChar: 'adChar', adCurrency: 'adCurrency', adDBDate: 'adDBDate', adDBTime: 'adDBTime', adDBTimeStamp: 'adDBTimeStamp', adDate: 'adDate', adDecimal: 'adDecimal', adDouble: 'adDouble', adEmpty: 'adEmpty', adError: 'adError', adFileTime: 'adFileTime', adGUID: 'adGUID', adIDispatch: 'adIDispatch', adIUnknown: 'adIUnknown', adInteger: 'adInteger', adLongVarBinary: 'adLongVarBinary', adLongVarChar: 'adLongVarChar', adLongVarWChar: 'adLongVarWChar', adNumeric: 'adNumeric', adPropVariant: 'adPropVariant', adSingle: 'adSingle', adSmallInt: 'adSmallInt', adTinyInt: 'adTinyInt', adUnsignedBigInt: 'adUnsignedBigInt', adUnsignedInt: 'adUnsignedInt', adUnsignedSmallInt: 'adUnsignedSmallInt', adUnsignedTinyInt: 'adUnsignedTinyInt', adUserDefined: 'adUserDefined', adVarBinary: 'adVarBinary', adVarChar: 'adVarChar', adVarNumeric: 'adVarNumeric', adVarWChar: 'adVarWChar', adVariant: 'adVariant', adWChar: 'adWChar', } def ado_type_name(ado_type): return adTypeNames.get(ado_type, 'unknown type ('+str(ado_type)+')') # here in decimal, sorted by value #adEmpty 0 Specifies no value (DBTYPE_EMPTY). #adSmallInt 2 Indicates a two-byte signed integer (DBTYPE_I2). #adInteger 3 Indicates a four-byte signed integer (DBTYPE_I4). #adSingle 4 Indicates a single-precision floating-point value (DBTYPE_R4). #adDouble 5 Indicates a double-precision floating-point value (DBTYPE_R8). #adCurrency 6 Indicates a currency value (DBTYPE_CY). Currency is a fixed-point number with four digits to the right of the decimal point. It is stored in an eight-byte signed integer scaled by 10,000. #adDate 7 Indicates a date value (DBTYPE_DATE). A date is stored as a double, the whole part of which is the number of days since December 30, 1899, and the fractional part of which is the fraction of a day. #adBSTR 8 Indicates a null-terminated character string (Unicode) (DBTYPE_BSTR). #adIDispatch 9 Indicates a pointer to an IDispatch interface on a COM object (DBTYPE_IDISPATCH). #adError 10 Indicates a 32-bit error code (DBTYPE_ERROR). #adBoolean 11 Indicates a boolean value (DBTYPE_BOOL). #adVariant 12 Indicates an Automation Variant (DBTYPE_VARIANT). #adIUnknown 13 Indicates a pointer to an IUnknown interface on a COM object (DBTYPE_IUNKNOWN). #adDecimal 14 Indicates an exact numeric value with a fixed precision and scale (DBTYPE_DECIMAL). #adTinyInt 16 Indicates a one-byte signed integer (DBTYPE_I1). #adUnsignedTinyInt 17 Indicates a one-byte unsigned integer (DBTYPE_UI1). #adUnsignedSmallInt 18 Indicates a two-byte unsigned integer (DBTYPE_UI2). #adUnsignedInt 19 Indicates a four-byte unsigned integer (DBTYPE_UI4). #adBigInt 20 Indicates an eight-byte signed integer (DBTYPE_I8). #adUnsignedBigInt 21 Indicates an eight-byte unsigned integer (DBTYPE_UI8). #adFileTime 64 Indicates a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (DBTYPE_FILETIME). #adGUID 72 Indicates a globally unique identifier (GUID) (DBTYPE_GUID). #adBinary 128 Indicates a binary value (DBTYPE_BYTES). #adChar 129 Indicates a string value (DBTYPE_STR). #adWChar 130 Indicates a null-terminated Unicode character string (DBTYPE_WSTR). #adNumeric 131 Indicates an exact numeric value with a fixed precision and scale (DBTYPE_NUMERIC). adUserDefined 132 Indicates a user-defined variable (DBTYPE_UDT). #adUserDefined 132 Indicates a user-defined variable (DBTYPE_UDT). #adDBDate 133 Indicates a date value (yyyymmdd) (DBTYPE_DBDATE). #adDBTime 134 Indicates a time value (hhmmss) (DBTYPE_DBTIME). #adDBTimeStamp 135 Indicates a date/time stamp (yyyymmddhhmmss plus a fraction in billionths) (DBTYPE_DBTIMESTAMP). #adChapter 136 Indicates a four-byte chapter value that identifies rows in a child rowset (DBTYPE_HCHAPTER). #adPropVariant 138 Indicates an Automation PROPVARIANT (DBTYPE_PROP_VARIANT). #adVarNumeric 139 Indicates a numeric value (Parameter object only). #adVarChar 200 Indicates a string value (Parameter object only). #adLongVarChar 201 Indicates a long string value (Parameter object only). #adVarWChar 202 Indicates a null-terminated Unicode character string (Parameter object only). #adLongVarWChar 203 Indicates a long null-terminated Unicode string value (Parameter object only). #adVarBinary 204 Indicates a binary value (Parameter object only). #adLongVarBinary 205 Indicates a long binary value (Parameter object only). #adArray (Does not apply to ADOX.) 0x2000 A flag value, always combined with another data type constant, that indicates an array of that other data type. # Error codes to names adoErrors= { 0xe7b :'adErrBoundToCommand', 0xe94 :'adErrCannotComplete', 0xea4 :'adErrCantChangeConnection', 0xc94 :'adErrCantChangeProvider', 0xe8c :'adErrCantConvertvalue', 0xe8d :'adErrCantCreate', 0xea3 :'adErrCatalogNotSet', 0xe8e :'adErrColumnNotOnThisRow', 0xd5d :'adErrDataConversion', 0xe89 :'adErrDataOverflow', 0xe9a :'adErrDelResOutOfScope', 0xea6 :'adErrDenyNotSupported', 0xea7 :'adErrDenyTypeNotSupported', 0xcb3 :'adErrFeatureNotAvailable', 0xea5 :'adErrFieldsUpdateFailed', 0xc93 :'adErrIllegalOperation', 0xcae :'adErrInTransaction', 0xe87 :'adErrIntegrityViolation', 0xbb9 :'adErrInvalidArgument', 0xe7d :'adErrInvalidConnection', 0xe7c :'adErrInvalidParamInfo', 0xe82 :'adErrInvalidTransaction', 0xe91 :'adErrInvalidURL', 0xcc1 :'adErrItemNotFound', 0xbcd :'adErrNoCurrentRecord', 0xe83 :'adErrNotExecuting', 0xe7e :'adErrNotReentrant', 0xe78 :'adErrObjectClosed', 0xd27 :'adErrObjectInCollection', 0xd5c :'adErrObjectNotSet', 0xe79 :'adErrObjectOpen', 0xbba :'adErrOpeningFile', 0xe80 :'adErrOperationCancelled', 0xe96 :'adErrOutOfSpace', 0xe88 :'adErrPermissionDenied', 0xe9e :'adErrPropConflicting', 0xe9b :'adErrPropInvalidColumn', 0xe9c :'adErrPropInvalidOption', 0xe9d :'adErrPropInvalidValue', 0xe9f :'adErrPropNotAllSettable', 0xea0 :'adErrPropNotSet', 0xea1 :'adErrPropNotSettable', 0xea2 :'adErrPropNotSupported', 0xbb8 :'adErrProviderFailed', 0xe7a :'adErrProviderNotFound', 0xbbb :'adErrReadFile', 0xe93 :'adErrResourceExists', 0xe92 :'adErrResourceLocked', 0xe97 :'adErrResourceOutOfScope', 0xe8a :'adErrSchemaViolation', 0xe8b :'adErrSignMismatch', 0xe81 :'adErrStillConnecting', 0xe7f :'adErrStillExecuting', 0xe90 :'adErrTreePermissionDenied', 0xe8f :'adErrURLDoesNotExist', 0xe99 :'adErrURLNamedRowDoesNotExist', 0xe98 :'adErrUnavailable', 0xe84 :'adErrUnsafeOperation', 0xe95 :'adErrVolumeNotFound', 0xbbc :'adErrWriteFile' } Index: readme.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/adodbapi/readme.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** readme.txt 14 Feb 2009 15:12:59 -0000 1.9 --- readme.txt 3 May 2010 05:40:33 -0000 1.10 *************** *** 11,18 **** Features: * 100% DB-API 2.0 compliant. ! * Includes pyunit testcases that describes how to use the module. ! * Fully implemented in Python. * Licensed under the LGPL license, which means that it can be used freely even in commercial programs subject to certain restrictions. * Supports eGenix mxDateTime, Python 2.3 datetime module and Python time module. Prerequisites: --- 11,19 ---- Features: * 100% DB-API 2.0 compliant. ! * Includes pyunit testcases that describe how to use the module. ! * Fully implemented in Python. -- runs in Python 2.3+ Python 3.0+ and IronPython 2.6+ * Licensed under the LGPL license, which means that it can be used freely even in commercial programs subject to certain restrictions. * Supports eGenix mxDateTime, Python 2.3 datetime module and Python time module. + * Supports multiple paramstyles: 'qmark' 'named' 'format' Prerequisites: *************** *** 21,25 **** Note: as of 2.1.1, adodbapi is included in pywin32 versions 211 and later. or ! Iron Python 2.0 or higher. NOTE: ........... --- 22,26 ---- Note: as of 2.1.1, adodbapi is included in pywin32 versions 211 and later. or ! Iron Python 2.6 or higher. (works in IPy2.0 for all data types except BUFFER) NOTE: ........... *************** *** 31,40 **** adodbapi.adodbapi.variantConversions[adodbapi.adNumeric] = adodbapi.adodbapi.cvtFloat or: ! adodbapi.adodbapi.variantConversions[adodbapi.adNumeric] = write_your_own_convertion_function ............ Whats new in version 2.2.6 1. Actually works in Python 3.0 (using pywin32 212.6) after running thru 2to3 2. RESTRICTION: Python Time (as opposed to datetime.datetime, which is the default) may return ! incorrect results. To avoid this problem, do not use adodbapi.pythonTimeConverter. 3. The python time converter test has been loosened so that it will pass in any time zone. 4. Several improvements in the test routines, including alteration of dbapi20 for Python 3.0 compatibility. --- 32,83 ---- adodbapi.adodbapi.variantConversions[adodbapi.adNumeric] = adodbapi.adodbapi.cvtFloat or: ! adodbapi.adodbapi.variantConversions[adodbapi.adNumeric] = write_your_own_convertion_function ............ + Whats new in version 2.3.0 # note: breaking changes and default changes! + This version is all about django support. There are two targets: + A) MS SQL database connections for mainstream django. + B) running django on IronPython + Someday, far in the future, this may result in: + C) MS SQL connections from django running on IronPython on Mono on Linux. (dreams sometimes come true.) + Thanks to Adam Vandenberg for the django modifications. + The changes are: + + 1. the ado constants are moved into their own module: ado_consts + This may break some old code, but Adam did it on his version and I like the improvement in readability. + Also, you get better documentation of some results, like convertion of MS data type codes to strings: + >>> ado_consts.adTypeNames[202] + 'adVarWChar' + >>> ado_consts.adTypeNames[cursr.description[0][1]] + 'adWChar' + ** deprecation warning: access to these constants as adodbapi.ad* will be removed in the future ** + + 2. will now default to client-side cursors. To get the old default, use something like: + adodbapi.adodbapi.defaultCursorLocation = ado_consts.adUseServer + ** change in default warning ** + + 3. Added ability to change paramstyle on the connection or the cursor: (An extension to the db api) + Possible values for paramstyle are: 'qmark', 'named', 'format'. The default remains 'qmark'. + (SQL language in '%s' format or ':namedParameter' format will be converted to '?' internally.) + when 'named' format is used, the parameters must be in a dict, rather than a sequence. + >>>c = adodbapi.connect('someConnectionString',timeout=30) + >>>c.paramstyle = 'spam' + <<<will result in: adodbapi.NotSupportedError: paramstyle="spam" not in:('qmark', 'named', 'format')>>> + ** new extension feature ** + + 4. Added abality to change the default paramstyle for adodbapi: (for django) + >>> import adodbapi as Database + >>> Database.paramstyle = 'format' + ** new extension feature ** + + Whats new in version 2.2.7 + 1. Does not automagically change to mx.DateTime when mx package is installed. (This by popular demand.) + to get results in mx.DateTime format, use: + adodbapi.adodbapi.dateconverter = adodbapi.adodbapi.mxDateTimeConverter + 2. implements cursor.next() + Whats new in version 2.2.6 1. Actually works in Python 3.0 (using pywin32 212.6) after running thru 2to3 2. RESTRICTION: Python Time (as opposed to datetime.datetime, which is the default) may return ! incorrect results due to daylight time bugs. To avoid this problem, do not use adodbapi.pythonTimeConverter. 3. The python time converter test has been loosened so that it will pass in any time zone. 4. Several improvements in the test routines, including alteration of dbapi20 for Python 3.0 compatibility. |
From: Roger U. <ru...@us...> - 2010-05-01 20:30:52
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv4903 Modified Files: PyDEVMODE.cpp Log Message: Ensure that python attribute changes are propagated (bug #2990983) Index: PyDEVMODE.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyDEVMODE.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PyDEVMODE.cpp 8 Feb 2009 05:20:02 -0000 1.10 --- PyDEVMODE.cpp 1 May 2010 20:30:41 -0000 1.11 *************** *** 321,324 **** --- 321,327 ---- PDEVMODEA PyDEVMODEA::GetDEVMODE(void) { + // Propagate any changes made by python attribute logic from the fixed length DEVMODE + // to the externally visible variable length DEVMODE before handing it off to anyone else + memcpy(pdevmode, &devmode, devmode.dmSize); return pdevmode; } *************** *** 715,718 **** --- 718,724 ---- PDEVMODEW PyDEVMODEW::GetDEVMODE(void) { + // Propagate any changes made by python attribute logic from the fixed length DEVMODE + // to the externally visible variable length DEVMODE before handing it off to anyone else + memcpy(pdevmode, &devmode, devmode.dmSize); return pdevmode; } |
From: Roger U. <ru...@us...> - 2010-02-05 21:54:03
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32wnet In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv27054 Modified Files: win32wnet.cpp Log Message: Add WNetGetConnection (feature req 2803660) Patch from bbondy Index: win32wnet.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32wnet/win32wnet.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** win32wnet.cpp 31 Jan 2009 05:48:36 -0000 1.19 --- win32wnet.cpp 5 Feb 2010 21:53:55 -0000 1.20 *************** *** 671,674 **** --- 671,722 ---- + // @pymethod string|win32wnet|WNetGetConnection|Retrieves the name of the network resource associated with a local device. + static + PyObject * + PyWNetGetConnection(PyObject *self, PyObject *args) + { + PyObject *ret = NULL; + PyObject *obConnection = Py_None; + DWORD length = 0; + DWORD errcode; + TCHAR *szConnection = NULL; + TCHAR *buf = NULL; + + // @pyparm string|connection|None|A string that is a drive-based path for a network resource. + // For example, if drive H has been mapped to a network drive share, and the network resource of interest is a file named Sample.doc in the directory \Win32\Examples on that share, the drive-based path is H:\Win32\Examples\Sample.doc. + if (!PyArg_ParseTuple(args, "|O", &obConnection)) + return NULL; + if (!PyWinObject_AsTCHAR(obConnection, &szConnection, TRUE)) + goto done; + // get the buffer size + { + Py_BEGIN_ALLOW_THREADS + errcode=WNetGetConnection(szConnection, NULL, &length); + Py_END_ALLOW_THREADS + } + if (length==0) { + ReturnNetError("WNetGetConnection", errcode); + goto done; + } + buf = (TCHAR *)malloc( sizeof( TCHAR) * length); + if (buf == NULL){ + PyErr_Format(PyExc_MemoryError, "Unable to allocate %d bytes", sizeof(TCHAR)*length); + goto done; + } + Py_BEGIN_ALLOW_THREADS + errcode = WNetGetConnection(szConnection, buf, &length); + Py_END_ALLOW_THREADS + if (0 != errcode) { + ReturnNetError("WNetGetConnection", errcode); + goto done; + } + // length includes the NULL - drop it (safely!) + ret = PyWinObject_FromTCHAR(buf, (length > 0) ? length-1 : 0); + done: + PyWinObject_FreeTCHAR(szConnection); + if (buf) free(buf); + return ret; + } + // @module win32wnet|A module that exposes the Windows Networking API. static PyMethodDef win32wnet_functions[] = { *************** *** 701,704 **** --- 749,756 ---- // @pymeth WNetGetResourceParent|Finds the parent resource of a network resource {"WNetGetResourceParent", PyWNetGetResourceParent, 1, "Finds the parent resource of a network resource"}, + // @pymeth WNetGetConnection|Retrieves the name of the network resource associated with a local device. + {"WNetGetConnection", PyWNetGetConnection, 1, "Retrieves the name of the network resource associated with a local device"}, + + {NULL, NULL} }; |
From: Roger U. <ru...@us...> - 2010-01-28 20:44:20
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/idle In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv30210 Modified Files: AutoIndent.py Log Message: Fix typo in IndentSearcher.run so that indent guessing works correctly Index: AutoIndent.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/idle/AutoIndent.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AutoIndent.py 3 Jan 2009 06:00:08 -0000 1.8 --- AutoIndent.py 28 Jan 2010 20:44:11 -0000 1.9 *************** *** 516,520 **** if typ == NAME and token in OPENERS: self.blkopenline = line ! elif type == INDENT and self.blkopenline: self.indentedline = line break --- 516,520 ---- if typ == NAME and token in OPENERS: self.blkopenline = line ! elif typ == INDENT and self.blkopenline: self.indentedline = line break |
From: Roger U. <ru...@us...> - 2010-01-26 17:45:35
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv30320 Modified Files: win32apimodule.cpp Log Message: Add a comment about handles duplicated for other processes. Index: win32apimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32apimodule.cpp,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** win32apimodule.cpp 10 Feb 2009 14:33:21 -0000 1.99 --- win32apimodule.cpp 26 Jan 2010 17:45:27 -0000 1.100 *************** *** 205,208 **** --- 205,211 ---- // @pymethod <o PyHANDLE>|win32api|DuplicateHandle|Duplicates a handle. + // @comm When duplicating a handle for a different process, you should either keep a + // reference to the returned PyHANDLE, or call .Detach() on it to prevent it + // from being closed prematurely. static PyObject *PyDuplicateHandle(PyObject *self, PyObject *args) { |
From: Roger U. <ru...@us...> - 2010-01-26 17:14:28
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv27085 Modified Files: makepy.py Log Message: When output filename is specified, open with mbcs encoding (bug #2934871) Index: makepy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/makepy.py,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** makepy.py 4 Dec 2008 03:18:32 -0000 1.28 --- makepy.py 26 Jan 2010 17:14:19 -0000 1.29 *************** *** 369,373 **** if path is not '' and not os.path.exists(path): os.makedirs(path) ! f = open(outputName, "w") else: f = None --- 369,377 ---- if path is not '' and not os.path.exists(path): os.makedirs(path) ! if sys.version_info > (3,0): ! f = open(outputName, "wt", encoding="mbcs") ! else: ! import codecs # not available in py3k. ! f = codecs.open(outputName, "w", "mbcs") else: f = None |
From: Roger U. <ru...@us...> - 2010-01-25 23:41:12
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv32617 Modified Files: dynamic.py Log Message: Fix display name of dynamic COM objects in Py3k Index: dynamic.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/dynamic.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** dynamic.py 22 Mar 2009 01:26:43 -0000 1.32 --- dynamic.py 25 Jan 2010 23:41:04 -0000 1.33 *************** *** 64,68 **** # A helper to create method objects on the fly ! if sys.version_info > (3,0): def MakeMethod(func, inst, cls): return types.MethodType(func, inst) # class not needed in py3k --- 64,69 ---- # A helper to create method objects on the fly ! py3k = sys.version_info > (3,0) ! if py3k: def MakeMethod(func, inst, cls): return types.MethodType(func, inst) # class not needed in py3k *************** *** 92,102 **** # displayed to the user in repr() etc. if userName is None: if isinstance(IDispatch, str): userName = IDispatch ! elif isinstance(IDispatch, unicode): ! # We always want the displayed name to be a real string userName = IDispatch.encode("ascii", "replace") ! elif type(userName) == unicode: ! # As above - always a string... userName = userName.encode("ascii", "replace") else: --- 93,106 ---- # displayed to the user in repr() etc. if userName is None: + # Displayed name should be a plain string in py2k, and unicode in py3k if isinstance(IDispatch, str): userName = IDispatch ! elif not py3k and isinstance(IDispatch, unicode): ! # 2to3 converts the above 'unicode' to 'str', but this will never be executed in py3k userName = IDispatch.encode("ascii", "replace") ! ## ??? else userName remains None ??? ! elif not py3k and isinstance(userName, unicode): ! # 2to3 converts the above 'unicode' to 'str', but this will never be executed in py3k ! # As above - always a plain string in py2k userName = userName.encode("ascii", "replace") else: |
From: Roger U. <ru...@us...> - 2010-01-25 23:36:35
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv31863 Modified Files: shellcon.py Log Message: Add constants used with SHAddToRecentDocs on Windows 7 Index: shellcon.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/shellcon.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** shellcon.py 26 Jul 2008 07:02:34 -0000 1.19 --- shellcon.py 25 Jan 2010 23:36:27 -0000 1.20 *************** *** 474,482 **** QIF_CACHED = 1 QIF_DONTEXPANDFOLDER = 2 SHARD_PIDL = 1 SHARD_PATHA = 2 SHARD_PATHW = 3 ! SHARD_PATH = SHARD_PATHW SHARD_PATH = SHARD_PATHA SHGDFIL_FINDDATA = 1 SHGDFIL_NETRESOURCE = 2 --- 474,490 ---- QIF_CACHED = 1 QIF_DONTEXPANDFOLDER = 2 + + # SHARD enum for SHAddToRecentDocs SHARD_PIDL = 1 SHARD_PATHA = 2 SHARD_PATHW = 3 ! SHARD_APPIDINFO = 4 ! SHARD_APPIDINFOIDLIST = 5 ! SHARD_LINK = 6 ! SHARD_APPIDINFOLINK = 7 ! SHARD_SHELLITEM = 8 ! ## SHARD_PATH = SHARD_PATHW SHARD_PATH = SHARD_PATHA + SHGDFIL_FINDDATA = 1 SHGDFIL_NETRESOURCE = 2 |
From: Roger U. <ru...@us...> - 2010-01-25 23:32:37
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv31143 Modified Files: shell.cpp Log Message: Allow SHAddToRecentDocs to accept strings containing null bytes Index: shell.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/shell.cpp,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** shell.cpp 14 Jan 2009 04:29:01 -0000 1.74 --- shell.cpp 25 Jan 2010 23:32:29 -0000 1.75 *************** *** 1418,1428 **** // @pymethod |shell|SHAddToRecentDocs|Adds a document to the shell's list of recently used documents or clears all documents from the list. The user gains access to the list through the Start menu of the Windows taskbar. static PyObject *PySHAddToRecentDocs(PyObject *self, PyObject *args) { int flags; void *whatever; ! if(!PyArg_ParseTuple(args, "iz:SHAddToRecentDocs", ! &flags, // @pyparm int|flags||Flag that indicates the meaning of the whatever parameter ! &whatever)) // @pyparm string|whatever||A path or <o PyIDL> return NULL; --- 1418,1433 ---- // @pymethod |shell|SHAddToRecentDocs|Adds a document to the shell's list of recently used documents or clears all documents from the list. The user gains access to the list through the Start menu of the Windows taskbar. + // @pyseeapi SHAddToRecentDocs + // @comm The underlying API function has no return value, and therefore no way to indicate failure. static PyObject *PySHAddToRecentDocs(PyObject *self, PyObject *args) { int flags; void *whatever; ! Py_ssize_t cb; // not used, but must accept strings containing NULL bytes ! if(!PyArg_ParseTuple(args, "iz#:SHAddToRecentDocs", ! &flags, // @pyparm int|flags||Value from SHARD enum indicating type of data passed in second arg ! &whatever, // @pyparm string/buffer|data||A file system path or PIDL (see <om shell.PIDLAsString>) identifying a shell object. ! &cb)) // In Windows 7, some flags require a buffer containing one of various structs. ! // Pass None to clear list of recent documents. return NULL; |
From: Roger U. <ru...@us...> - 2010-01-23 17:25:55
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13761 Modified Files: oleargs.cpp Log Message: Move boolean checks above PyLong_Check Skip redundant PyInt_Check in Py3k Index: oleargs.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/oleargs.cpp,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** oleargs.cpp 8 Jul 2009 02:12:07 -0000 1.47 --- oleargs.cpp 23 Jan 2010 17:25:47 -0000 1.48 *************** *** 61,64 **** --- 61,75 ---- V_VT(var) = VT_BSTR; } + // For 3.x, bool checks need to be above PyLong_Check, which now succeeds for booleans. + else if (obj == Py_True) + { + V_VT(var) = VT_BOOL; + V_BOOL(var) = VARIANT_TRUE; + } + else if (obj == Py_False) + { + V_VT(var) = VT_BOOL; + V_BOOL(var) = VARIANT_FALSE; + } else if (PyLong_Check(obj)) { *************** *** 98,111 **** V_VT(var) = VT_NULL; } ! else if (obj == Py_True) ! { ! V_VT(var) = VT_BOOL; ! V_BOOL(var) = VARIANT_TRUE; ! } ! else if (obj == Py_False) ! { ! V_VT(var) = VT_BOOL; ! V_BOOL(var) = VARIANT_FALSE; ! } else if (PyInt_Check(obj)) { --- 109,114 ---- V_VT(var) = VT_NULL; } ! #if (PY_VERSION_HEX < 0x03000000) ! // This is redundant in 3.x, since PyInt_Check is #defined to PyLong_Check else if (PyInt_Check(obj)) { *************** *** 113,116 **** --- 116,120 ---- V_I4(var) = PyInt_AsLong(obj); } + #endif else if (PyObject_HasAttrString(obj, "_oleobj_")) { |
Update of /cvsroot/pywin32/pywin32/AutoDuck In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv25359 Modified Files: BuildHHP.py Dump2HHC.py InsertExternalOverviews.py TOCToHHK.py document_object.py makedfromi.py py2d.py Log Message: Fix bug 2896861: AutoDuck Py3k port (Sridhar Ratnakumar) Index: py2d.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/py2d.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** py2d.py 28 Jan 2009 10:47:10 -0000 1.2 --- py2d.py 2 Dec 2009 10:49:35 -0000 1.3 *************** *** 6,9 **** --- 6,22 ---- return re.sub(r"([^<]*)<([^>]*)>", r"\g<1>\\<\g<2>\\>", s) + if sys.version_info[0] >= 3: + # Python3 specific code + types.ClassType = type + Print = __builtins__.__dict__['print'] + long = int + else: + # Python2 specific code + def Print(value, file=sys.stdout): + print >>file, value + def next(iter): + # Python3's global next() function + return iter.next() + class DocInfo: def __init__(self, name, ob): *************** *** 15,21 **** def BuildArgInfos(ob): ret = [] ! vars = list(ob.func_code.co_varnames[:ob.func_code.co_argcount]) vars.reverse() # for easier default checking. ! defs = list(ob.func_defaults or []) for i, n in enumerate(vars): info = DocInfo(n, ob) --- 28,34 ---- def BuildArgInfos(ob): ret = [] ! vars = list(ob.__code__.co_varnames[:ob.__code__.co_argcount]) vars.reverse() # for easier default checking. ! defs = list(ob.__defaults__ or []) for i, n in enumerate(vars): info = DocInfo(n, ob) *************** *** 71,75 **** return "" g = gen_paras(desc) ! first = g.next() chunks = [first[0]] chunks.extend(["// " + l for l in first[1:]]) --- 84,88 ---- return "" g = gen_paras(desc) ! first = next(g) chunks = [first[0]] chunks.extend(["// " + l for l in first[1:]]) *************** *** 102,109 **** constants.append( (name, ob) ) info = BuildInfo(mod_name, mod) ! print >> fp, "// @module %s|%s" % (mod_name, format_desc(info.desc)) functions = [f for f in functions if should_build_function(f)] for ob in functions: ! print >> fp, "// @pymeth %s|%s" % (ob.name, ob.short_desc) for ob in classes: # only classes with docstrings get printed. --- 115,122 ---- constants.append( (name, ob) ) info = BuildInfo(mod_name, mod) ! Print("// @module %s|%s" % (mod_name, format_desc(info.desc)), file=fp) functions = [f for f in functions if should_build_function(f)] for ob in functions: ! Print("// @pymeth %s|%s" % (ob.name, ob.short_desc), file=fp) for ob in classes: # only classes with docstrings get printed. *************** *** 111,119 **** continue ob_name = mod_name + "." + ob.name ! print >> fp, "// @pyclass %s|%s" % (ob.name, ob.short_desc) for ob in functions: ! print >> fp, "// @pymethod |%s|%s|%s" % (mod_name, ob.name, format_desc(ob.desc)) for ai in BuildArgInfos(ob.ob): ! print >> fp, "// @pyparm |%s|%s|%s" % (ai.name, ai.default, ai.short_desc) for ob in classes: --- 124,132 ---- continue ob_name = mod_name + "." + ob.name ! Print("// @pyclass %s|%s" % (ob.name, ob.short_desc), file=fp) for ob in functions: ! Print("// @pymethod |%s|%s|%s" % (mod_name, ob.name, format_desc(ob.desc)), file=fp) for ai in BuildArgInfos(ob.ob): ! Print("// @pyparm |%s|%s|%s" % (ai.name, ai.default, ai.short_desc), file=fp) for ob in classes: *************** *** 122,130 **** continue ob_name = mod_name + "." + ob.name ! print >> fp, "// @object %s|%s" % (ob_name, format_desc(ob.desc)) func_infos = [] # We need to iter the keys then to a getattr() so the funky descriptor # things work. ! for n in ob.ob.__dict__.iterkeys(): o = getattr(ob.ob, n) if isinstance(o, (types.FunctionType, types.MethodType)): --- 135,143 ---- continue ob_name = mod_name + "." + ob.name ! Print("// @object %s|%s" % (ob_name, format_desc(ob.desc)), file=fp) func_infos = [] # We need to iter the keys then to a getattr() so the funky descriptor # things work. ! for n in ob.ob.__dict__.keys(): o = getattr(ob.ob, n) if isinstance(o, (types.FunctionType, types.MethodType)): *************** *** 133,144 **** func_infos.append(info) for fi in func_infos: ! print >> fp, "// @pymeth %s|%s" % (fi.name, fi.short_desc) for fi in func_infos: ! print >> fp, "// @pymethod |%s|%s|%s" % (ob_name, fi.name, format_desc(fi.desc)) if hasattr(fi.ob, 'im_self') and fi.ob.im_self is ob.ob: ! print >> fp, "// @comm This is a @classmethod." ! print >> fp, "// @pymethod |%s|%s|%s" % (ob_name, fi.name, format_desc(fi.desc)) for ai in BuildArgInfos(fi.ob): ! print >> fp, "// @pyparm |%s|%s|%s" % (ai.name, ai.default, ai.short_desc) for (name, val) in constants: --- 146,157 ---- func_infos.append(info) for fi in func_infos: ! Print("// @pymeth %s|%s" % (fi.name, fi.short_desc), file=fp) for fi in func_infos: ! Print("// @pymethod |%s|%s|%s" % (ob_name, fi.name, format_desc(fi.desc)), file=fp) if hasattr(fi.ob, 'im_self') and fi.ob.im_self is ob.ob: ! Print("// @comm This is a @classmethod.", file=fp) ! Print("// @pymethod |%s|%s|%s" % (ob_name, fi.name, format_desc(fi.desc)), file=fp) for ai in BuildArgInfos(fi.ob): ! Print("// @pyparm |%s|%s|%s" % (ai.name, ai.default, ai.short_desc), file=fp) for (name, val) in constants: *************** *** 146,156 **** if type(val) in (int, long): desc += " (0x%x)" % (val,) ! print >> fp, "// @const %s|%s|%s" % (mod_name, name, desc) def main(fp, args): ! print >> fp, "// @doc" for arg in args: build_module(sys.stdout, arg) ! if __name__=='__main__': main(sys.stdout, sys.argv[1:]) --- 159,169 ---- if type(val) in (int, long): desc += " (0x%x)" % (val,) ! Print("// @const %s|%s|%s" % (mod_name, name, desc), file=fp) def main(fp, args): ! Print("// @doc", file=fp) for arg in args: build_module(sys.stdout, arg) ! if __name__=='__main__': main(sys.stdout, sys.argv[1:]) Index: makedfromi.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/makedfromi.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** makedfromi.py 11 Jul 2006 06:58:52 -0000 1.8 --- makedfromi.py 2 Dec 2009 10:49:35 -0000 1.9 *************** *** 7,25 **** def GetComments(line, lineNo, lines): # Get the comment from this and continuous lines, if they exist. ! data = string.split(line, "//", 2) doc = "" ! if len(data)==2: doc=string.strip(data[1]) lineNo = lineNo + 1 while lineNo < len(lines): line = lines[lineNo] ! data = string.split(line, "//", 2) if len(data)!=2: break ! if string.strip(data[0]): break # Not a continutation! if data[1].strip().startswith("@"): # new command break ! doc = doc + "\n// " + string.strip(data[1]) lineNo = lineNo + 1 # This line doesnt match - step back --- 7,25 ---- def GetComments(line, lineNo, lines): # Get the comment from this and continuous lines, if they exist. ! data = line.split("//", 2) doc = "" ! if len(data)==2: doc=data[1].strip() lineNo = lineNo + 1 while lineNo < len(lines): line = lines[lineNo] ! data = line.split("//", 2) if len(data)!=2: break ! if data[0].strip(): break # Not a continutation! if data[1].strip().startswith("@"): # new command break ! doc = doc + "\n// " + data[1].strip() lineNo = lineNo + 1 # This line doesnt match - step back *************** *** 45,55 **** try: if line[:7]=="%module": ! extra = string.split(line, "//") if len(extra)>1: ! modName = string.strip(extra[0][7:]) modDoc, lineNo = GetComments(line, lineNo, lines) lineNo += 1 elif line[:7]=="#define" and not bInRawBlock: ! cname = string.split(line)[1] doc, lineNo = GetComments(line, lineNo, lines) constants.append((cname, doc)) --- 45,55 ---- try: if line[:7]=="%module": ! extra = line.split("//") if len(extra)>1: ! modName = extra[0][7:].strip() modDoc, lineNo = GetComments(line, lineNo, lines) lineNo += 1 elif line[:7]=="#define" and not bInRawBlock: ! cname = line.split()[1] doc, lineNo = GetComments(line, lineNo, lines) constants.append((cname, doc)) *************** *** 80,84 **** extra_tags.append("// " + doc + '\n') except: ! print "Line %d is badly formed - %s" % (lineNo, str(sys.exc_value)) lineNo = lineNo + 1 --- 80,85 ---- extra_tags.append("// " + doc + '\n') except: ! _, msg, _ = sys.exc_info() ! print("Line %d is badly formed - %s" % (lineNo, msg)) lineNo = lineNo + 1 *************** *** 107,113 **** outFile.write("\n") for (meth, extras) in these_methods: ! fields = string.split(meth,'|') ! if len(fields)<>3: ! print "**Error - %s does not have enough fields" % meth else: outFile.write("// @pymethod %s|%s|%s|%s\n" % (fields[0],thisModName,fields[1], fields[2])) --- 108,114 ---- outFile.write("\n") for (meth, extras) in these_methods: ! fields = meth.split('|') ! if len(fields)!=3: ! print("**Error - %s does not have enough fields" % meth) else: outFile.write("// @pymethod %s|%s|%s|%s\n" % (fields[0],thisModName,fields[1], fields[2])) *************** *** 120,124 **** outFile.write("\n// @module %s|%s\n" % (thisModName,modDoc)) for (meth, extras) in these_methods: ! fields = string.split(meth,'|') outFile.write("// @pymeth %s|%s\n" % (fields[1], fields[2])) chunk_number += 1 --- 121,125 ---- outFile.write("\n// @module %s|%s\n" % (thisModName,modDoc)) for (meth, extras) in these_methods: ! fields = meth.split('|') outFile.write("// @pymeth %s|%s\n" % (fields[1], fields[2])) chunk_number += 1 *************** *** 142,149 **** elif o=='-o': outName = a ! msg = string.join(args) ! except getopt.error, msg: ! print msg ! print "Usage: %s [-o output_name] [-p com_parent] filename" % sys.argv[0] return --- 143,151 ---- elif o=='-o': outName = a ! msg = ' '.join(args) ! except getopt.error: ! _, msg, _ = sys.exc_info() ! print(msg) ! print("Usage: %s [-o output_name] [-p com_parent] filename" % sys.argv[0]) return Index: Dump2HHC.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/Dump2HHC.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Dump2HHC.py 11 Sep 2004 07:39:43 -0000 1.6 --- Dump2HHC.py 2 Dec 2009 10:49:35 -0000 1.7 *************** *** 1,4 **** import os - import string import sys import pprint --- 1,3 ---- *************** *** 32,36 **** top.context = "html/" + oi.href top.type = "topic" ! assert not d.has_key(top.name) and not self.overviewTopics.has_key(top.name), \ "Duplicate named topic detected: " + top.name d[top.name] = top --- 31,35 ---- top.context = "html/" + oi.href top.type = "topic" ! assert not top.name in d and not top.name in self.overviewTopics, \ "Duplicate named topic detected: " + top.name d[top.name] = top *************** *** 58,61 **** --- 57,62 ---- else: return -1 + def TopicKey(a): + return a.name def parseCategories(): *************** *** 88,92 **** # chop line = line[:-1] ! fields = string.split(line, "\t") while len(fields) > 0: assert len(fields) == 3, fields --- 89,93 ---- # chop line = line[:-1] ! fields = line.split("\t") while len(fields) > 0: assert len(fields) == 3, fields *************** *** 96,103 **** line = input.readline() if line == '': ! raise ValueError, "incomplete topic!" # chop line = line[:-1] ! fields = string.split(line, "\t") assert len(fields) == 2 assert len(fields[0]) == 0 --- 97,104 ---- line = input.readline() if line == '': ! raise ValueError("incomplete topic!") # chop line = line[:-1] ! fields = line.split("\t") assert len(fields) == 2 assert len(fields[0]) == 0 *************** *** 107,114 **** line = input.readline() line = line[:-1] ! fields = string.split(line, "\t") assert len(fields[0]) == 0 and len(fields[1]) == 0 if line == '': ! raise ValueError, "incomplete topic!" # Loop over the rest of the properties, # and add them appropriately. :) --- 108,115 ---- line = input.readline() line = line[:-1] ! fields = line.split("\t") assert len(fields[0]) == 0 and len(fields[1]) == 0 if line == '': ! raise ValueError("incomplete topic!") # Loop over the rest of the properties, # and add them appropriately. :) *************** *** 118,122 **** # chop line = line[:-1] ! fields = string.split(line, "\t") while len(fields) > 0: if len(fields[0]) > 0: --- 119,123 ---- # chop line = line[:-1] ! fields = line.split("\t") while len(fields) > 0: if len(fields[0]) > 0: *************** *** 128,132 **** # chop line = line[:-1] ! fields = string.split(line, "\t") else: # add to modules or object --- 129,133 ---- # chop line = line[:-1] ! fields = line.split("\t") else: # add to modules or object *************** *** 140,155 **** d = cat.constants else: ! raise RuntimeError, "What is '%s'" % (top.type,) ! if d.has_key(top.name): ! print "Duplicate named %s detected: %s" % (top.type, top.name) # Skip the property fields line for module/object line = input.readline() line = line[:-1] ! fields = string.split(line, "\t") assert len(fields[0]) == 0 and len(fields[1]) == 0, "%s, %s" %(fields, top.name) if line == '': ! raise ValueError, "incomplete topic!" # Loop over the rest of the properties, --- 141,156 ---- d = cat.constants else: ! raise RuntimeError("What is '%s'" % (top.type,)) ! if top.name in d: ! print("Duplicate named %s detected: %s" % (top.type, top.name)) # Skip the property fields line for module/object line = input.readline() line = line[:-1] ! fields = line.split("\t") assert len(fields[0]) == 0 and len(fields[1]) == 0, "%s, %s" %(fields, top.name) if line == '': ! raise ValueError("incomplete topic!") # Loop over the rest of the properties, *************** *** 160,164 **** # chop line = line[:-1] ! fields = string.split(line, "\t") while len(fields) > 0: if len(fields[0]) > 0: --- 161,165 ---- # chop line = line[:-1] ! fields = line.split("\t") while len(fields) > 0: if len(fields[0]) > 0: *************** *** 173,179 **** line = input.readline() if line == '': ! raise ValueError, "incomplete topic!" line = line[:-1] ! fields = string.split(line, "\t") assert len(fields[0]) == 0 and len(fields[1]) == 0, fields if top2.type == "pymeth": --- 174,180 ---- line = input.readline() if line == '': ! raise ValueError("incomplete topic!") line = line[:-1] ! fields = line.split("\t") assert len(fields[0]) == 0 and len(fields[1]) == 0, fields if top2.type == "pymeth": *************** *** 190,194 **** # chop line = line[:-1] ! fields = string.split(line, "\t") continue # Add top2 into top --- 191,195 ---- # chop line = line[:-1] ! fields = line.split("\t") continue # Add top2 into top *************** *** 201,205 **** # chop line = line[:-1] ! fields = string.split(line, "\t") d[top.name] = top --- 202,206 ---- # chop line = line[:-1] ! fields = line.split("\t") d[top.name] = top *************** *** 216,220 **** def _genCategoryHTMLFromDict(dict, output): ! keys = dict.keys() keys.sort() for key in keys: --- 217,221 ---- def _genCategoryHTMLFromDict(dict, output): ! keys = list(dict.keys()) keys.sort() for key in keys: *************** *** 255,259 **** def _genItemsFromDict(dict, cat, output, target, do_children = 1): CHM = "mk:@MSITStore:%s.chm::/" % target ! keys = dict.keys() keys.sort() for k in keys: --- 256,260 ---- def _genItemsFromDict(dict, cat, output, target, do_children = 1): CHM = "mk:@MSITStore:%s.chm::/" % target ! keys = list(dict.keys()) keys.sort() for k in keys: *************** *** 272,276 **** output.write("<UL>") containees = copy.copy(dict[k].contains) ! containees.sort(TopicCmp) for m in containees: output.write(''' --- 273,277 ---- output.write("<UL>") containees = copy.copy(dict[k].contains) ! containees.sort(key=TopicKey) for m in containees: output.write(''' Index: TOCToHHK.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/TOCToHHK.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TOCToHHK.py 24 Nov 1999 08:43:17 -0000 1.1 --- TOCToHHK.py 2 Dec 2009 10:49:35 -0000 1.2 *************** *** 2,6 **** import os.path import sys - import string """ --- 2,5 ---- *************** *** 28,39 **** # chop line line = line[:-1] ! fields = string.split(line, "\t") if "." in fields[1]: ! keyword = string.split(fields[1], ".")[-1] else: keyword = fields[1] context = fields[0] if " " in context: ! context = string.replace(context, " ", "_") out.write(""" <LI><OBJECT type="text/sitemap"> <param name="Keyword" value="%s"> --- 27,38 ---- # chop line line = line[:-1] ! fields = line.split("\t") if "." in fields[1]: ! keyword = fields[1].split(".")[-1] else: keyword = fields[1] context = fields[0] if " " in context: ! context = context.replace(" ", "_") out.write(""" <LI><OBJECT type="text/sitemap"> <param name="Keyword" value="%s"> Index: InsertExternalOverviews.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/InsertExternalOverviews.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** InsertExternalOverviews.py 31 May 2005 12:40:05 -0000 1.2 --- InsertExternalOverviews.py 2 Dec 2009 10:49:35 -0000 1.3 *************** *** 17,23 **** if not line: break ! line = string.replace(line, "<!--index:exlinks-->", extLinksHTML) ! line = string.replace(line, "<!--index:extopics-->", extTopicHTML) ! line = string.replace(line, "<!--index:eximportant-->", importantHTML) out.write(line + "\n") --- 17,23 ---- if not line: break ! line = line.replace("<!--index:exlinks-->", extLinksHTML) ! line = line.replace("<!--index:extopics-->", extTopicHTML) ! line = line.replace("<!--index:eximportant-->", importantHTML) out.write(line + "\n") *************** *** 29,33 **** for item in cat.overviewItems.items: dict[item.name] = item.href ! keys = dict.keys() keys.sort() for k in keys: --- 29,33 ---- for item in cat.overviewItems.items: dict[item.name] = item.href ! keys = list(dict.keys()) keys.sort() for k in keys: *************** *** 45,49 **** def main(): if len(sys.argv) != 2: ! print "Invalid args" sys.exit(1) file = sys.argv[1] --- 45,49 ---- def main(): if len(sys.argv) != 2: ! print("Invalid args") sys.exit(1) file = sys.argv[1] Index: document_object.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/document_object.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** document_object.py 26 Nov 2008 08:39:32 -0000 1.3 --- document_object.py 2 Dec 2009 10:49:35 -0000 1.4 *************** *** 68,80 **** if __name__=='__main__': doc = GetDocument() ! print "Important Notes" for link in doc.important: ! print " ", link.name, link.href ! print "Doc links" for link in doc.links: ! print " ", link.name, link.href ! print "Doc categories" for c in doc: ! print " ", c.id, c.label --- 68,80 ---- if __name__=='__main__': doc = GetDocument() ! print("Important Notes") for link in doc.important: ! print(" ", link.name, link.href) ! print("Doc links") for link in doc.links: ! print(" ", link.name, link.href) ! print("Doc categories") for c in doc: ! print(" ", c.id, c.label) Index: BuildHHP.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/AutoDuck/BuildHHP.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** BuildHHP.py 11 Sep 2004 07:40:22 -0000 1.9 --- BuildHHP.py 2 Dec 2009 10:49:35 -0000 1.10 *************** *** 40,44 **** new = glob.glob(g) if len(new)==0: ! print "The pattern '%s' yielded no files!" % (g,) lFiles = lFiles + new # lFiles is now the list of origin files. --- 40,44 ---- new = glob.glob(g) if len(new)==0: ! print("The pattern '%s' yielded no files!" % (g,)) lFiles = lFiles + new # lFiles is now the list of origin files. *************** *** 66,70 **** # else we have a trailing slash - it means we _expect_ it to be a patch as-is. assert os.path.isdir(sCommonPrefix) and sCommonPrefix[-1]=="\\", "commonprefix splitting aint gunna work!" ! print "sCommonPrefix=", sCommonPrefix # Ok, now remove this common prefix from every file: lRelativeFiles = [] --- 66,70 ---- # else we have a trailing slash - it means we _expect_ it to be a patch as-is. assert os.path.isdir(sCommonPrefix) and sCommonPrefix[-1]=="\\", "commonprefix splitting aint gunna work!" ! print("sCommonPrefix=", sCommonPrefix) # Ok, now remove this common prefix from every file: lRelativeFiles = [] |
From: Mark H. <mha...@us...> - 2009-10-15 05:31:36
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axscript/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20869/com/win32comext/axscript/client Modified Files: framework.py Log Message: resolve issue causing ASP pages to fail when reloaded Index: framework.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/client/framework.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** framework.py 27 Nov 2008 11:17:32 -0000 1.27 --- framework.py 15 Oct 2009 05:31:26 -0000 1.28 *************** *** 747,752 **** def ResetNamedItems(self): # Due to the way we work, we re-create persistent ones. self.subItems = {} ! for name, item in self.subItems.iteritems(): item.Close() if item.flags & axscript.SCRIPTITEM_ISPERSISTENT: --- 747,753 ---- def ResetNamedItems(self): # Due to the way we work, we re-create persistent ones. + existing = self.subItems self.subItems = {} ! for name, item in existing.iteritems(): item.Close() if item.flags & axscript.SCRIPTITEM_ISPERSISTENT: |
From: Mark H. <mha...@us...> - 2009-10-15 05:31:35
|
Update of /cvsroot/pywin32/pywin32 In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv20869 Modified Files: CHANGES.txt Log Message: resolve issue causing ASP pages to fail when reloaded Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** CHANGES.txt 27 Sep 2009 12:04:31 -0000 1.51 --- CHANGES.txt 15 Oct 2009 05:31:26 -0000 1.52 *************** *** 9,12 **** --- 9,14 ---- ---------------- + * Fix problem causing ASP pages to fail when reloaded. + * mapiutil.py functions GetMapiTypeName and GetPropTagName have been modified to better distinguish between PT_UNICODE and PT_STRING8 type names |
From: Mark H. <mha...@us...> - 2009-09-27 12:04:46
|
Update of /cvsroot/pywin32/pywin32 In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23510 Modified Files: CHANGES.txt Log Message: mapiutil.py functions GetMapiTypeName and GetPropTagName have been modified to better distinguish between PT_UNICODE and PT_STRING8 type names during reverse lookups. (Nick Czeczulin) Index: CHANGES.txt =================================================================== RCS file: /cvsroot/pywin32/pywin32/CHANGES.txt,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** CHANGES.txt 12 Jun 2009 07:48:33 -0000 1.50 --- CHANGES.txt 27 Sep 2009 12:04:31 -0000 1.51 *************** *** 6,9 **** --- 6,18 ---- However contributors are encouraged to add their own entries for their work. + Since build 214: + ---------------- + + * mapiutil.py functions GetMapiTypeName and GetPropTagName have been modified + to better distinguish between PT_UNICODE and PT_STRING8 type names + during reverse lookups. (Nick Czeczulin) + + * Fix encoding problem in makepy (Massa, Harald Armin) + Since build 213: ---------------- |
From: Mark H. <mha...@us...> - 2009-09-27 12:04:43
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/mapi In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23510/com/win32comext/mapi Modified Files: mapitags.py mapiutil.py Log Message: mapiutil.py functions GetMapiTypeName and GetPropTagName have been modified to better distinguish between PT_UNICODE and PT_STRING8 type names during reverse lookups. (Nick Czeczulin) Index: mapitags.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/mapitags.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mapitags.py 20 Jan 2004 01:24:31 -0000 1.4 --- mapitags.py 27 Sep 2009 12:04:32 -0000 1.5 *************** *** 258,264 **** PR_BODY_W = PROP_TAG( PT_UNICODE, 4096) PR_BODY_A = PROP_TAG( PT_STRING8, 4096) ! PR_BODY_HTML_A = PROP_TAG( PT_STRING8, 4115) PR_BODY_HTML_W = PROP_TAG( PT_UNICODE, 4115) ! PR_REPORT_TEXT = PROP_TAG( PT_TSTRING, 4097) PR_REPORT_TEXT_W = PROP_TAG( PT_UNICODE, 4097) --- 258,264 ---- PR_BODY_W = PROP_TAG( PT_UNICODE, 4096) PR_BODY_A = PROP_TAG( PT_STRING8, 4096) ! PR_BODY_HTML = PROP_TAG( PT_TSTRING, 4115) PR_BODY_HTML_W = PROP_TAG( PT_UNICODE, 4115) ! PR_BODY_HTML_A = PROP_TAG( PT_STRING8, 4115) PR_REPORT_TEXT = PROP_TAG( PT_TSTRING, 4097) PR_REPORT_TEXT_W = PROP_TAG( PT_UNICODE, 4097) Index: mapiutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/mapiutil.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mapiutil.py 11 Dec 2008 06:55:34 -0000 1.11 --- mapiutil.py 27 Sep 2009 12:04:32 -0000 1.12 *************** *** 18,21 **** --- 18,33 ---- # to the ID. prTable[value] = name + + # String types should have 3 definitions in mapitags.py + # PR_BODY = PROP_TAG( PT_TSTRING, 4096) + # PR_BODY_W = PROP_TAG( PT_UNICODE, 4096) + # PR_BODY_A = PROP_TAG( PT_STRING8, 4096) + # The following change ensures a lookup using only the the + # property id returns the conditional default. + + if (mapitags.PROP_TYPE(value) == mapitags.PT_UNICODE or \ + mapitags.PROP_TYPE(value) == mapitags.PT_STRING8) and \ + (name[-2:] == '_A' or name[-2:] == '_W'): + continue prTable[mapitags.PROP_ID(value)] = name try: *************** *** 49,52 **** --- 61,69 ---- for name, value in mapitags.__dict__.iteritems(): if name[:3] == 'PT_': + # PT_TSTRING is a conditional assignment + # for either PT_UNICODE or PT_STRING8 and + # should not be returned during a lookup. + if name == 'PT_TSTRING': + continue ptTable[value] = name |
From: Roger U. <ru...@us...> - 2009-07-10 05:30:07
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25875 Modified Files: interact.py Log Message: Fix interactive SyntaxError display (bug #2818443) Index: interact.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/framework/interact.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** interact.py 19 Apr 2009 06:46:24 -0000 1.22 --- interact.py 10 Jul 2009 05:30:00 -0000 1.23 *************** *** 259,263 **** code.InteractiveInterpreter.__init__(self, locals) def showsyntaxerror(self, filename=None): ! sys.stderr.write(tracebackHeader) # So the color syntaxer recognises it. code.InteractiveInterpreter.showsyntaxerror(self, filename) def runcode(self, code): --- 259,263 ---- code.InteractiveInterpreter.__init__(self, locals) def showsyntaxerror(self, filename=None): ! sys.stderr.write(tracebackHeader.decode('ascii')) # So the color syntaxer recognises it. code.InteractiveInterpreter.showsyntaxerror(self, filename) def runcode(self, code): |
From: Mark H. <mha...@us...> - 2009-07-08 05:38:14
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src/include In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13867/com/win32com/src/include Modified Files: PythonCOM.h Log Message: use LONGLONG/ULONGLONG instead of 'long long' etc Index: PythonCOM.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/include/PythonCOM.h,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** PythonCOM.h 12 Jun 2009 07:48:33 -0000 1.31 --- PythonCOM.h 8 Jul 2009 02:12:07 -0000 1.32 *************** *** 705,709 **** short m_sBuf; long m_lBuf; ! long long m_llBuf; VARIANT_BOOL m_boolBuf; double m_dBuf; --- 705,709 ---- short m_sBuf; long m_lBuf; ! LONGLONG m_llBuf; VARIANT_BOOL m_boolBuf; double m_dBuf; |
From: Mark H. <mha...@us...> - 2009-07-08 05:38:03
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13719/win32/src Modified Files: win32gui.i Log Message: autoduck corrections Index: win32gui.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32gui.i,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -d -r1.127 -r1.128 *** win32gui.i 10 Apr 2009 07:30:55 -0000 1.127 --- win32gui.i 8 Jul 2009 02:11:03 -0000 1.128 *************** *** 4575,4579 **** // @pyswig int|GetOpenFileName|Creates an Open dialog box that lets the user specify the drive, directory, and the name of a file or set of files to open. // @rdesc If the user presses OK, the function returns TRUE. Otherwise, use CommDlgExtendedError for error details. ! // @param string/bytes|OPENFILENAME||A string packed into an OPENFILENAME structure, probably via the struct module. BOOL GetOpenFileName(OPENFILENAME *INPUT); --- 4575,4579 ---- // @pyswig int|GetOpenFileName|Creates an Open dialog box that lets the user specify the drive, directory, and the name of a file or set of files to open. // @rdesc If the user presses OK, the function returns TRUE. Otherwise, use CommDlgExtendedError for error details. ! // @pyparm string/bytes|OPENFILENAME||A string packed into an OPENFILENAME structure, probably via the struct module. BOOL GetOpenFileName(OPENFILENAME *INPUT); |
From: Mark H. <mha...@us...> - 2009-07-08 05:38:01
|
Update of /cvsroot/pywin32/pywin32/com/win32com/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13867/com/win32com/src Modified Files: oleargs.cpp Log Message: use LONGLONG/ULONGLONG instead of 'long long' etc Index: oleargs.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/oleargs.cpp,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** oleargs.cpp 12 Jun 2009 07:48:33 -0000 1.46 --- oleargs.cpp 8 Jul 2009 02:12:07 -0000 1.47 *************** *** 1145,1149 **** case VT_UI8 | VT_BYREF: if (bCreateBuffers) ! V_UI8REF(var) = (unsigned long long *)&m_llBuf; if (!VALID_BYREF_MISSING(obj)) { --- 1145,1149 ---- case VT_UI8 | VT_BYREF: if (bCreateBuffers) ! V_UI8REF(var) = (ULONGLONG *)&m_llBuf; if (!VALID_BYREF_MISSING(obj)) { |
From: Mark H. <mha...@us...> - 2009-07-08 05:38:00
|
Update of /cvsroot/pywin32/pywin32 In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13960 Modified Files: setup.py Log Message: fix build issues with 3.1, and build 214 Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** setup.py 18 Jun 2009 10:22:58 -0000 1.108 --- setup.py 8 Jul 2009 02:13:00 -0000 1.109 *************** *** 1,3 **** ! build_id="213.1" # may optionally include a ".{patchno}" suffix. # Putting buildno at the top prevents automatic __doc__ assignment, and # I *want* the build number at the top :) --- 1,3 ---- ! build_id="214" # may optionally include a ".{patchno}" suffix. # Putting buildno at the top prevents automatic __doc__ assignment, and # I *want* the build number at the top :) *************** *** 1121,1128 **** --- 1121,1141 ---- extra_dll = self.debug and "_d.dll" or ".dll" extra_exe = self.debug and "_d.exe" or ".exe" + # *sob* - python fixed this bug in python 3.1 (bug 6403) + # So in the fixed versions we only get the base name, and if the + # output name is simply 'dir\name' we need to nothing. + + # The pre 3.1 pywintypes if name == "pywin32_system32.pywintypes": return r"pywin32_system32\pywintypes%d%d%s" % (sys.version_info[0], sys.version_info[1], extra_dll) + # 3.1+ pywintypes + elif name == "pywintypes": + return r"pywintypes%d%d%s" % (sys.version_info[0], sys.version_info[1], extra_dll) + # pre 3.1 pythoncom elif name == "pywin32_system32.pythoncom": return r"pywin32_system32\pythoncom%d%d%s" % (sys.version_info[0], sys.version_info[1], extra_dll) + # 3.1+ pythoncom + elif name == "pythoncom": + return r"pythoncom%d%d%s" % (sys.version_info[0], sys.version_info[1], extra_dll) + # Pre 3.1 rest. elif name.endswith("win32.perfmondata"): return r"win32\perfmondata" + extra_dll *************** *** 1133,1136 **** --- 1146,1155 ---- elif name.endswith("isapi.PyISAPI_loader"): return r"isapi\PyISAPI_loader" + extra_dll + # The post 3.1 rest + elif name in ['perfmondata', 'PyISAPI_loader']: + return name + extra_dll + elif name in ['pythonservice', 'Pythonwin']: + return name + extra_exe + return build_ext.get_ext_filename(self, name) |
From: Roger U. <ru...@us...> - 2009-07-05 20:56:27
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14288 Modified Files: win32file.i Log Message: Corrent return type and constant name for CreateSymbolicLink Index: win32file.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -d -r1.107 -r1.108 *** win32file.i 16 Feb 2009 03:56:25 -0000 1.107 --- win32file.i 5 Jul 2009 20:56:24 -0000 1.108 *************** *** 2837,2843 **** typedef BOOL (WINAPI *CreateHardLinkTransactedfunc)(LPWSTR, LPWSTR, LPSECURITY_ATTRIBUTES, HANDLE); static CreateHardLinkTransactedfunc pfnCreateHardLinkTransacted=NULL; ! typedef BOOL (WINAPI *CreateSymbolicLinkfunc)(LPWSTR,LPWSTR,DWORD); static CreateSymbolicLinkfunc pfnCreateSymbolicLink=NULL; ! typedef BOOL (WINAPI *CreateSymbolicLinkTransactedfunc)(LPCWSTR,LPCWSTR,DWORD,HANDLE); static CreateSymbolicLinkTransactedfunc pfnCreateSymbolicLinkTransacted=NULL; --- 2837,2843 ---- typedef BOOL (WINAPI *CreateHardLinkTransactedfunc)(LPWSTR, LPWSTR, LPSECURITY_ATTRIBUTES, HANDLE); static CreateHardLinkTransactedfunc pfnCreateHardLinkTransacted=NULL; ! typedef BOOLEAN (WINAPI *CreateSymbolicLinkfunc)(LPWSTR,LPWSTR,DWORD); static CreateSymbolicLinkfunc pfnCreateSymbolicLink=NULL; ! typedef BOOLEAN (WINAPI *CreateSymbolicLinkTransactedfunc)(LPCWSTR,LPCWSTR,DWORD,HANDLE); static CreateSymbolicLinkTransactedfunc pfnCreateSymbolicLinkTransacted=NULL; *************** *** 3187,3191 **** &oblinkname, // @pyparm <o PyUnicode>|SymlinkFileName||Path of the symbolic link to be created &obtargetname, // @pyparm <o PyUnicode>|TargetFileName||The name of file to which link will point ! &flags, // @pyparm int|Flags|0|SYMLINK_FLAG_DIRECTORY is only defined flag &obtrans)) // @pyparm <o PyHANDLE>|Transaction|None|Handle to a transaction, as returned by <om win32transaction.CreateTransaction> return NULL; --- 3187,3191 ---- &oblinkname, // @pyparm <o PyUnicode>|SymlinkFileName||Path of the symbolic link to be created &obtargetname, // @pyparm <o PyUnicode>|TargetFileName||The name of file to which link will point ! &flags, // @pyparm int|Flags|0|SYMBOLIC_LINK_FLAG_DIRECTORY is only defined flag &obtrans)) // @pyparm <o PyHANDLE>|Transaction|None|Handle to a transaction, as returned by <om win32transaction.CreateTransaction> return NULL; *************** *** 3200,3204 **** if (PyWinObject_AsWCHAR(oblinkname, &linkname, FALSE) && PyWinObject_AsWCHAR(obtargetname, &targetname, FALSE)){ ! BOOL bsuccess; if (htrans) bsuccess=(*pfnCreateSymbolicLinkTransacted)(linkname, targetname, flags, htrans); --- 3200,3204 ---- if (PyWinObject_AsWCHAR(oblinkname, &linkname, FALSE) && PyWinObject_AsWCHAR(obtargetname, &targetname, FALSE)){ ! BOOLEAN bsuccess; if (htrans) bsuccess=(*pfnCreateSymbolicLinkTransacted)(linkname, targetname, flags, htrans); *************** *** 5566,5567 **** --- 5566,5570 ---- // Info level for GetFileAttributesEx and GetFileAttributesTransacted (GET_FILEEX_INFO_LEVELS enum) #define GetFileExInfoStandard 1 + + // Flags for CreateSymbolicLink/CreateSymbolicLinkTransacted + #define SYMBOLIC_LINK_FLAG_DIRECTORY 1 |
From: Mark H. <mha...@us...> - 2009-06-18 10:42:17
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv26202/com/win32com/client Modified Files: build.py Log Message: don't pass more arg names than we have arg infos for Index: build.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/build.py,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** build.py 26 Jan 2009 00:47:31 -0000 1.40 --- build.py 18 Jun 2009 10:41:05 -0000 1.41 *************** *** 490,496 **** names = list(names) while None in names: ! i = names.index(None) ! names[i] = "arg%d" % (i,) ! names = list(map(MakePublicAttributeName, names[1:])) name_num = 0 while len(names) < numArgs: --- 490,499 ---- names = list(names) while None in names: ! i = names.index(None) ! names[i] = "arg%d" % (i,) ! # We've seen 'source safe' libraries offer the name of 'ret' params in ! # 'names' - although we can't reproduce this, it would be insane to offer ! # more args than we have arg infos for - hence the upper limit on names... ! names = list(map(MakePublicAttributeName, names[1:(numArgs + 1)])) name_num = 0 while len(names) < numArgs: |
From: Mark H. <mha...@us...> - 2009-06-18 10:23:16
|
Update of /cvsroot/pywin32/pywin32 In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21294 Modified Files: setup.py Log Message: Support for IExchangeManageStore from Nick Czeczulin - thanks! Index: setup.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/setup.py,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -d -r1.107 -r1.108 *** setup.py 11 Mar 2009 07:13:12 -0000 1.107 --- setup.py 18 Jun 2009 10:22:58 -0000 1.108 *************** *** 1704,1712 **** %(mapi)s/mapiguids.cpp """ % dirs).split()), ! WinExt_win32com_mapi('exchange', libraries="version", sources=(""" %(mapi)s/exchange.i %(mapi)s/exchange.cpp """ % dirs).split()), ! WinExt_win32com_mapi('exchdapi', sources=(""" %(mapi)s/exchdapi.i %(mapi)s/exchdapi.cpp --- 1704,1713 ---- %(mapi)s/mapiguids.cpp """ % dirs).split()), ! WinExt_win32com_mapi('exchange', libraries="version user32 advapi32", sources=(""" %(mapi)s/exchange.i %(mapi)s/exchange.cpp + %(mapi)s/PyIExchangeManageStore.i %(mapi)s/PyIExchangeManageStore.cpp """ % dirs).split()), ! WinExt_win32com_mapi('exchdapi', libraries="advapi32", sources=(""" %(mapi)s/exchdapi.i %(mapi)s/exchdapi.cpp *************** *** 1888,1891 **** --- 1889,1893 ---- 'exchange': None, 'exchdapi': None, + 'PyIExchangeManageStore': '', # ADSI 'adsi': None, # module |