From cappy2112 at gmail.com Thu Sep 2 06:55:54 2010 From: cappy2112 at gmail.com (Tony Cappellini) Date: Wed, 1 Sep 2010 21:55:54 -0700 Subject: [python-win32] Installation problem: Python 2.6.6 (32-Bit) on Windows 7 (32-Bit) Message-ID: This is OT, but I can't seem to get an answer on CLP. Has anyone else had problems running the msi for Python 2.6.6 on Windows 7 Professional? If I don't check "Compile .py to byte code", the installer completes without error. Checking "Compile .py to byte code" causes the following to be displayed "There is a problem with the windows installer package. A program run as part of setup did not complete as expected" 1. I have GB of disk space available. 2. I have admin privileges 3. The MD5 checksum of the downloaded installer matches the MD5 checksum on python.org 4. Run As Adminsitrator is not available when I Shift-Right Click (probably because my login already has admin privileges) From brian.curtin at gmail.com Thu Sep 2 07:45:42 2010 From: brian.curtin at gmail.com (Brian Curtin) Date: Thu, 2 Sep 2010 00:45:42 -0500 Subject: [python-win32] Installation problem: Python 2.6.6 (32-Bit) on Windows 7 (32-Bit) In-Reply-To: References: Message-ID: On Wed, Sep 1, 2010 at 23:55, Tony Cappellini wrote: > This is OT, but I can't seem to get an answer on CLP. > > Has anyone else had problems running the msi for Python 2.6.6 on > Windows 7 Professional? > > If I don't check "Compile .py to byte code", the installer completes > without error. > > Checking "Compile .py to byte code" causes the following to be > displayed > > "There is a problem with the windows installer package. A program run > as part of setup did not complete as expected" > > 1. I have GB of disk space available. > 2. I have admin privileges > 3. The MD5 checksum of the downloaded installer matches the MD5 > checksum on python.org > 4. Run As Adminsitrator is not available when I Shift-Right Click > (probably because my login already has admin privileges) It's a known bug in the installer. I'd have to dig through the tracker to find the issue numbers, but I reported this issue for a 3.1.x installer and tested out a fix which appeared to work. The fix might not have been backported to 2.x, though. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cappy2112 at gmail.com Thu Sep 2 08:08:39 2010 From: cappy2112 at gmail.com (Tony Cappellini) Date: Wed, 1 Sep 2010 23:08:39 -0700 Subject: [python-win32] Installation problem: Python 2.6.6 (32-Bit) on Windows 7 (32-Bit) In-Reply-To: References: Message-ID: Thanks Brian. If it's a known bug, why don't they pull that installer down? On Wed, Sep 1, 2010 at 10:45 PM, Brian Curtin wrote: > On Wed, Sep 1, 2010 at 23:55, Tony Cappellini wrote: >> >> This is OT, but I can't seem to get an answer on CLP. >> >> Has anyone else had problems running the msi for Python 2.6.6 on >> Windows 7 Professional? >> >> If I don't check "Compile .py to byte code", the installer completes >> without error. >> >> Checking "Compile .py to byte code" causes the following to be >> displayed >> >> "There is a problem with the windows installer package. A program run >> as part of setup did not complete as expected" >> >> 1. I have GB of disk space available. >> 2. I have admin privileges >> 3. The MD5 checksum of the downloaded installer matches the MD5 >> checksum on python.org >> 4. Run As Adminsitrator is not available when I Shift-Right Click >> (probably because my login already has admin privileges) > > It's a known bug in the installer.?I'd have to dig through the tracker to > find the issue numbers, but I reported this issue for a 3.1.x installer and > tested out a fix which appeared to work. The fix might not have been > backported to 2.x, though. From dardoschuster at hotmail.com Thu Sep 2 12:36:38 2010 From: dardoschuster at hotmail.com (Dardo Schuster Glez) Date: Thu, 2 Sep 2010 10:36:38 +0000 Subject: [python-win32] FW: Problems with recordset object In-Reply-To: References: Message-ID: Dear Sirs I was programming many years with delphi/sql server and now i am looking python with your ado library to migrate . I am making my first ado program with python using python 3.1 and pythonwin but i have a problem : recordset can?t acces fields data i send you a sample and the answer from python # First import two useful modules import win32com.client from adoconstants import * # Create the ADO Connection object via COM. oConn = win32com.client.Dispatch('ADODB.Connection') # Now set the connection properties via the ConnectionString # We're connecting to a SQL Server on 192.168.1.100 using OLEDB. oConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\personal.mdb;" # Now open the connection oConn.Open() if oConn.State == adStateOpen: # Do something here print ("We've connected to the database.") # Now create a RecordSet object and open a table rs = win32com.client.Dispatch('ADODB.Recordset') rs.Open("select * from agenda",oConn,1,3) # Open a table called agenda # Can also use oRS.Open("zipcode", oConn) instead of setting ActiveConnection print( repr(rs)) while not rs.EOF: print (rs.fields("nombre")) # Move to the next record in the RecordSet rs.MoveNext() # Close up the connection and unload the COM object if oConn.State == adStateOpen: oConn.Close() oConn = None Answer from python We've connected to the database. Traceback (most recent call last): File "C:\Dardo\Lenguaje Python\ado\Ejemplo\base-de-datos.py", line 27, in print (rs.fields("nombre")) File "C:\Python31\lib\site-packages\win32com\client\__init__.py", line 462, in __getattr__ raise AttributeError("'%s' object has no attribute '%s'" % (repr(self), attr)) AttributeError: '' object has no attribute 'fields' Which is the problem ??? Please answer a soon as posible Thanks Dardo R. Schuster Tenerife - canary islands - Spain -------------- next part -------------- An HTML attachment was scrubbed... URL: From smokefloat at gmail.com Thu Sep 2 15:11:05 2010 From: smokefloat at gmail.com (David Hutto) Date: Thu, 2 Sep 2010 09:11:05 -0400 Subject: [python-win32] FW: Problems with recordset object In-Reply-To: References: Message-ID: On Thu, Sep 2, 2010 at 6:36 AM, Dardo Schuster Glez wrote: > Dear Sirs > > I was programming many years with delphi/sql server and now i am looking > python with your ado library to migrate . I am making my first ado program > with python using python 3.1 and pythonwin but i have a problem : recordset > can?t acces fields data i send you a sample and the answer from python > > # First import two useful modules > import win32com.client > from adoconstants import * > # Create the ADO Connection object via COM. > oConn = win32com.client.Dispatch('ADODB.Connection') > # Now set the connection properties via the ConnectionString > # We're connecting to a SQL Server on 192.168.1.100 using OLEDB. > oConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data > Source=C:\personal.mdb;" > # Now open the connection > oConn.Open() > > if oConn.State == adStateOpen: > ? # Do something here > ? print ("We've connected to the database.") > # Now create a RecordSet object and open a table > ? rs = win32com.client.Dispatch('ADODB.Recordset') > ? rs.Open("select * from agenda",oConn,1,3)???????????? # Open a table > called agenda > ? # Can also use oRS.Open("zipcode", oConn) instead of setting > ActiveConnection > ? print( repr(rs)) > > ? while not rs.EOF: > ????? print (rs.fields("nombre")) > ????? # Move to the next record in the RecordSet > ????? rs.MoveNext() > > # Close up the connection and unload the COM object > ? if oConn.State == adStateOpen: oConn.Close() > ? oConn = None > > > Answer from python > > We've connected to the database. > instance at 0x26371984> > Traceback (most recent call last): > ? File "C:\Dardo\Lenguaje Python\ado\Ejemplo\base-de-datos.py", line 27, in > > ??? print (rs.fields("nombre")) I'm not positive but I think it's telling you that this rs has no attribute fields. So us help(rs) and see if you're using it correctly or maby you need to reference a class as well before using it. > ? File "C:\Python31\lib\site-packages\win32com\client\__init__.py", line > 462, in __getattr__ > ??? raise AttributeError("'%s' object has no attribute '%s'" % (repr(self), > attr)) > AttributeError: ' Library._Recordset instance at 0x26371984>' object has no attribute 'fields' > > Which is the problem ??? > Please answer a soon as posible > Thanks > Dardo R. Schuster > Tenerife - canary islands - Spain > > > > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > > From brian.curtin at gmail.com Thu Sep 2 16:11:14 2010 From: brian.curtin at gmail.com (Brian Curtin) Date: Thu, 2 Sep 2010 09:11:14 -0500 Subject: [python-win32] Installation problem: Python 2.6.6 (32-Bit) on Windows 7 (32-Bit) In-Reply-To: References: Message-ID: On Thu, Sep 2, 2010 at 01:08, Tony Cappellini wrote: > Thanks Brian. > If it's a known bug, why don't they pull that installer down? Then there would be no installers for 2.6.6, effectively removing Windows from the list of supported platforms. The compile step is nice, but not required, and certainly not a show-stopper. http://bugs.python.org/issue6716 is one of the few issues on the topic, and it contains the fixes by Martin, which were only applied to trunk (2.7) and py3k (3.2). -------------- next part -------------- An HTML attachment was scrubbed... URL: From cappy2112 at gmail.com Thu Sep 2 16:27:50 2010 From: cappy2112 at gmail.com (Tony Cappellini) Date: Thu, 2 Sep 2010 07:27:50 -0700 Subject: [python-win32] Installation problem: Python 2.6.6 (32-Bit) on Windows 7 (32-Bit) In-Reply-To: References: Message-ID: >> If it's a known bug, why don't they pull that installer down? > > Then there would be no installers for 2.6.6, effectively removing Windows > from the list of supported platforms. The compile step is nice, but not > required, and certainly not a show-stopper. I guess a more important question is, Once installation completes without doing the compile step, does the same module have a problem compiling when it is imported as part of a normal script execution? From brian.curtin at gmail.com Thu Sep 2 16:38:56 2010 From: brian.curtin at gmail.com (Brian Curtin) Date: Thu, 2 Sep 2010 09:38:56 -0500 Subject: [python-win32] Installation problem: Python 2.6.6 (32-Bit) on Windows 7 (32-Bit) In-Reply-To: References: Message-ID: On Thu, Sep 2, 2010 at 09:27, Tony Cappellini wrote: > >> If it's a known bug, why don't they pull that installer down? > > > > Then there would be no installers for 2.6.6, effectively removing Windows > > from the list of supported platforms. The compile step is nice, but not > > required, and certainly not a show-stopper. > > I guess a more important question is, Once installation completes > without doing the compile step, > does the same module have a problem compiling when it is imported as > part of a normal script execution? > Nope, everything else is fine. The bug in the installer had to do with bad command line options to compileall.py which is what goes through and executes the pyc compilation on stdlib modules. That script was failing to run properly, but compilation itself does work. -------------- next part -------------- An HTML attachment was scrubbed... URL: From timr at probo.com Thu Sep 2 18:30:23 2010 From: timr at probo.com (Tim Roberts) Date: Thu, 2 Sep 2010 09:30:23 -0700 Subject: [python-win32] FW: Problems with recordset object In-Reply-To: References: Message-ID: <4C7FD11F.7010304@probo.com> Dardo Schuster Glez wrote: > Dear Sirs > > I was programming many years with delphi/sql server and now i am > looking python with your ado library to migrate . I am making my first > ado program with python using python 3.1 and pythonwin but i have a > problem : recordset can?t acces fields data i send you a sample and > the answer from python > ... > while not rs.EOF: > print (rs.fields("nombre")) > # Move to the next record in the RecordSet > rs.MoveNext() > ... > AttributeError: ' Library._Recordset instance at 0x26371984>' object has no attribute > 'fields' > > Which is the problem ??? The problem is that the collection property is spelled "Fields", not "fields". > Please answer a soon as posible As a general rule, it not polite to make a request like that. We are all unpaid volunteers here. If someone knows the answer, they'll respond as soon as they read your question. If no one knows the answer, no one will respond. No one is going to read your message and say "I think I'll wait until tomorrow to answer this." -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From shivisi at nana.co.il Thu Sep 2 21:27:21 2010 From: shivisi at nana.co.il (Zev Spitz) Date: Thu, 02 Sep 2010 22:27:21 +0300 Subject: [python-win32] problems with recordset object In-Reply-To: References: Message-ID: <4C7FFA99.2070609@nana.co.il> It's the Fields collection (with an uppercase F), not the fields collection. Python is case-sensitive. On 9/2/2010 5:38 PM, python-win32-request at python.org wrote: > Send python-win32 mailing list submissions to > python-win32 at python.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/python-win32 > or, via email, send a message with subject or body 'help' to > python-win32-request at python.org > > You can reach the person managing the list at > python-win32-owner at python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of python-win32 digest..." > > > Today's Topics: > > 1. FW: Problems with recordset object (Dardo Schuster Glez) > 2. Re: FW: Problems with recordset object (David Hutto) > 3. Re: Installation problem: Python 2.6.6 (32-Bit) on Windows 7 > (32-Bit) (Brian Curtin) > 4. Re: Installation problem: Python 2.6.6 (32-Bit) on Windows 7 > (32-Bit) (Tony Cappellini) > 5. Re: Installation problem: Python 2.6.6 (32-Bit) on Windows 7 > (32-Bit) (Brian Curtin) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 2 Sep 2010 10:36:38 +0000 > From: Dardo Schuster Glez > To: > Subject: [python-win32] FW: Problems with recordset object > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > > > > > Dear Sirs > > I was programming many years with delphi/sql server and now i am looking python with your ado library to migrate . I am making my first ado program with python using python 3.1 and pythonwin but i have a problem : recordset can?t acces fields data i send you a sample and the answer from python > > # First import two useful modules > import win32com.client > from adoconstants import * > # Create the ADO Connection object via COM. > oConn = win32com.client.Dispatch('ADODB.Connection') > # Now set the connection properties via the ConnectionString > # We're connecting to a SQL Server on 192.168.1.100 using OLEDB. > oConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\personal.mdb;" > # Now open the connection > oConn.Open() > > if oConn.State == adStateOpen: > # Do something here > print ("We've connected to the database.") > # Now create a RecordSet object and open a table > rs = win32com.client.Dispatch('ADODB.Recordset') > rs.Open("select * from agenda",oConn,1,3) # Open a table called agenda > # Can also use oRS.Open("zipcode", oConn) instead of setting ActiveConnection > print( repr(rs)) > > while not rs.EOF: > print (rs.fields("nombre")) > # Move to the next record in the RecordSet > rs.MoveNext() > > # Close up the connection and unload the COM object > if oConn.State == adStateOpen: oConn.Close() > oConn = None > > > Answer from python > > We've connected to the database. > > Traceback (most recent call last): > File "C:\Dardo\Lenguaje Python\ado\Ejemplo\base-de-datos.py", line 27, in > print (rs.fields("nombre")) > File "C:\Python31\lib\site-packages\win32com\client\__init__.py", line 462, in __getattr__ > raise AttributeError("'%s' object has no attribute '%s'" % (repr(self), attr)) > AttributeError: '' object has no attribute 'fields' > > Which is the problem ??? > Please answer a soon as posible > Thanks > Dardo R. Schuster > Tenerife - canary islands - Spain > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 2 > Date: Thu, 2 Sep 2010 09:11:05 -0400 > From: David Hutto > To: Dardo Schuster Glez > Cc: python-win32 at python.org > Subject: Re: [python-win32] FW: Problems with recordset object > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > > On Thu, Sep 2, 2010 at 6:36 AM, Dardo Schuster Glez > wrote: >> Dear Sirs >> >> I was programming many years with delphi/sql server and now i am looking >> python with your ado library to migrate . I am making my first ado program >> with python using python 3.1 and pythonwin but i have a problem : recordset >> can?t acces fields data i send you a sample and the answer from python >> >> # First import two useful modules >> import win32com.client >> from adoconstants import * >> # Create the ADO Connection object via COM. >> oConn = win32com.client.Dispatch('ADODB.Connection') >> # Now set the connection properties via the ConnectionString >> # We're connecting to a SQL Server on 192.168.1.100 using OLEDB. >> oConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data >> Source=C:\personal.mdb;" >> # Now open the connection >> oConn.Open() >> >> if oConn.State == adStateOpen: >> ? # Do something here >> ? print ("We've connected to the database.") >> # Now create a RecordSet object and open a table >> ? rs = win32com.client.Dispatch('ADODB.Recordset') >> ? rs.Open("select * from agenda",oConn,1,3)???????????? # Open a table >> called agenda >> ? # Can also use oRS.Open("zipcode", oConn) instead of setting >> ActiveConnection >> ? print( repr(rs)) >> >> ? while not rs.EOF: >> ????? print (rs.fields("nombre")) >> ????? # Move to the next record in the RecordSet >> ????? rs.MoveNext() >> >> # Close up the connection and unload the COM object >> ? if oConn.State == adStateOpen: oConn.Close() >> ? oConn = None >> >> >> Answer from python >> >> We've connected to the database. >> > instance at 0x26371984> >> Traceback (most recent call last): >> ? File "C:\Dardo\Lenguaje Python\ado\Ejemplo\base-de-datos.py", line 27, in >> >> ??? print (rs.fields("nombre")) > I'm not positive but I think it's telling you that this rs has no > attribute fields. So us help(rs) and see if you're using it correctly > or maby you need to reference a class as well before using it. > >> ? File "C:\Python31\lib\site-packages\win32com\client\__init__.py", line >> 462, in __getattr__ >> ??? raise AttributeError("'%s' object has no attribute '%s'" % (repr(self), >> attr)) >> AttributeError: '> Library._Recordset instance at 0x26371984>' object has no attribute 'fields' >> >> Which is the problem ??? >> Please answer a soon as posible >> Thanks >> Dardo R. Schuster >> Tenerife - canary islands - Spain >> >> >> >> >> _______________________________________________ >> python-win32 mailing list >> python-win32 at python.org >> http://mail.python.org/mailman/listinfo/python-win32 >> >> > > ------------------------------ > > Message: 3 > Date: Thu, 2 Sep 2010 09:11:14 -0500 > From: Brian Curtin > To: cappy2112 at gmail.com > Cc: python-win32 at python.org > Subject: Re: [python-win32] Installation problem: Python 2.6.6 > (32-Bit) on Windows 7 (32-Bit) > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > On Thu, Sep 2, 2010 at 01:08, Tony Cappellini wrote: > >> Thanks Brian. >> If it's a known bug, why don't they pull that installer down? > > Then there would be no installers for 2.6.6, effectively removing Windows > from the list of supported platforms. The compile step is nice, but not > required, and certainly not a show-stopper. > > http://bugs.python.org/issue6716 is one of the few issues on the topic, and > it contains the fixes by Martin, which were only applied to trunk (2.7) and > py3k (3.2). > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > Message: 4 > Date: Thu, 2 Sep 2010 07:27:50 -0700 > From: Tony Cappellini > To: Brian Curtin > Cc: python-win32 at python.org > Subject: Re: [python-win32] Installation problem: Python 2.6.6 > (32-Bit) on Windows 7 (32-Bit) > Message-ID: > > Content-Type: text/plain; charset=ISO-8859-1 > >>> If it's a known bug, why don't they pull that installer down? >> Then there would be no installers for 2.6.6, effectively removing Windows >> from the list of supported platforms. The compile step is nice, but not >> required, and certainly not a show-stopper. > I guess a more important question is, Once installation completes > without doing the compile step, > does the same module have a problem compiling when it is imported as > part of a normal script execution? > > > ------------------------------ > > Message: 5 > Date: Thu, 2 Sep 2010 09:38:56 -0500 > From: Brian Curtin > To: cappy2112 at gmail.com > Cc: python-win32 at python.org > Subject: Re: [python-win32] Installation problem: Python 2.6.6 > (32-Bit) on Windows 7 (32-Bit) > Message-ID: > > Content-Type: text/plain; charset="iso-8859-1" > > On Thu, Sep 2, 2010 at 09:27, Tony Cappellini wrote: > >>>> If it's a known bug, why don't they pull that installer down? >>> Then there would be no installers for 2.6.6, effectively removing Windows >>> from the list of supported platforms. The compile step is nice, but not >>> required, and certainly not a show-stopper. >> I guess a more important question is, Once installation completes >> without doing the compile step, >> does the same module have a problem compiling when it is imported as >> part of a normal script execution? >> > Nope, everything else is fine. The bug in the installer had to do with bad > command line options to compileall.py which is what goes through and > executes the pyc compilation on stdlib modules. That script was failing to > run properly, but compilation itself does work. > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > > > End of python-win32 Digest, Vol 90, Issue 2 > ******************************************* > From vernondcole at gmail.com Thu Sep 2 23:09:16 2010 From: vernondcole at gmail.com (Vernon Cole) Date: Thu, 2 Sep 2010 15:09:16 -0600 Subject: [python-win32] FW: Problems with recordset object In-Reply-To: References: Message-ID: Dardo: Why are you going to all this work? You could simply... import adodbapi which has all of the COM interface things already written. There is a new version which has the ability to access columns by name, and which uses objects to read data directly from the recordset (rather than copying data into Python tuples.) You can pick it up from http://sourceforge.net/projects/adodbapi/ -- that installer will replace the copy which comes with pywin32. It passes all of the tests (including reading and writing ACCESS tables) -- but someone trying the new features in a new application would be very welcome. Unit tests can miss things. Please try it out and let me (and everyone else) know how it works for you. -- Vernon Cole On Thu, Sep 2, 2010 at 4:36 AM, Dardo Schuster Glez < dardoschuster at hotmail.com> wrote: > Dear Sirs > > I was programming many years with delphi/sql server and now i am looking > python with your ado library to migrate . I am making my first ado program > with python using python 3.1 and pythonwin but i have a problem : recordset > can?t acces fields data i send you a sample and the answer from python > > # First import two useful modules > import win32com.client > from adoconstants import * > # Create the ADO Connection object via COM. > oConn = win32com.client.Dispatch('ADODB.Connection') > # Now set the connection properties via the ConnectionString > # We're connecting to a SQL Server on 192.168.1.100 using OLEDB. > oConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data > Source=C:\personal.mdb;" > # Now open the connection > oConn.Open() > > if oConn.State == adStateOpen: > # Do something here > print ("We've connected to the database.") > # Now create a RecordSet object and open a table > rs = win32com.client.Dispatch('ADODB.Recordset') > rs.Open("select * from agenda",oConn,1,3) # Open a table > called agenda > # Can also use oRS.Open("zipcode", oConn) instead of setting > ActiveConnection > print( repr(rs)) > > while not rs.EOF: > print (rs.fields("nombre")) > # Move to the next record in the RecordSet > rs.MoveNext() > > # Close up the connection and unload the COM object > if oConn.State == adStateOpen: oConn.Close() > oConn = None > > > Answer from python > > We've connected to the database. > instance at 0x26371984> > Traceback (most recent call last): > File "C:\Dardo\Lenguaje Python\ado\Ejemplo\base-de-datos.py", line 27, in > > print (rs.fields("nombre")) > File "C:\Python31\lib\site-packages\win32com\client\__init__.py", line > 462, in __getattr__ > raise AttributeError("'%s' object has no attribute '%s'" % (repr(self), > attr)) > AttributeError: ' Library._Recordset instance at 0x26371984>' object has no attribute 'fields' > > Which is the problem ??? > Please answer a soon as posible > Thanks > Dardo R. Schuster > Tenerife - canary islands - Spain > > > > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From erik.oosterwaal at gmail.com Fri Sep 3 16:46:18 2010 From: erik.oosterwaal at gmail.com (Erik Oosterwaal) Date: Fri, 3 Sep 2010 16:46:18 +0200 Subject: [python-win32] Trying again: debugging inside Windows Script Components Message-ID: Hi All, I have asked this question before, but there were no answers then. I have several problems relating to Python in classic ASP using WSC's, but this one is the real showstopper for us. When I use Python in a WSC and I instantiate that WSC in a classic ASP page, all works as expected, if the code inside the WSC is bug-free. However, if there is a bug in the Python code inside the WSC, IIS just gives me something like: *error '80020009'** **Exception occurred. **/tools/python.asp**, line 6* When I use vbscript in the WSC and there's a bug, Visual studio just pops up and lets me debug it. Not so with Python. I have tried several routes, Googling (ofcourse), using win32traceutil (* print()* output appears in the trace collector, but an error doesn't, so stdout seems to work, and stderr doesn't ). I've also tried debugview from sysinternals, because I've read somewhere that that program can also show tracebacks, but in my case it shows nothing. I've enabled debugging in the WSC, in the registry for active scripting and in IIS for both client side as well as server side. I've also tried setting stderr to stdout and using trace collector. I don't need a fancy solution, just a way to view the traceback somewhere. If anyone has a suggestion, even a far-fetched one, I'm willing to try it. Thanks, Erik -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonvspython at gmail.com Wed Sep 8 17:26:47 2010 From: jonvspython at gmail.com (jon vs. python) Date: Wed, 8 Sep 2010 17:26:47 +0200 Subject: [python-win32] DDE Server Poke Message-ID: Hi, I'm new to pywin32 and DDE. I'm trying to create a DDE server that interfaces an Excel Worksheet. Excel will act as a client in order to read from and write to the server. I had no problem implementing the Request operation (*). But I failed to implement Poke operation in the server. Any hint or sample code on how to implement DDE Poke ? Thanks, Jon. (*) Based on http://www.google.com/codesearch/p?hl=es#OAMlx_jo-ck/tools/third_party/python_26/Lib/site-packages/win32/Demos/dde/ddeserver.py&q=dde%20lang:python&sa=N&cd=1&ct=rc -------------- next part -------------- An HTML attachment was scrubbed... URL: From mico_siahaan at yahoo.com Fri Sep 10 09:36:42 2010 From: mico_siahaan at yahoo.com (Mico Siahaan) Date: Fri, 10 Sep 2010 07:36:42 +0000 Subject: [python-win32] Building and Installing Python from source Message-ID: <1364835845-1284104206-cardhu_decombobulator_blackberry.rim.net-673306589-@bda051.bisx.prodap.on.blackberry> Dear all, sorry for these basic questions. I downloaded python source then I built python executable using pcbuild.sln in PCBuild folder as stated in readme.txt. I built most of them successfully except tkinter, bsdbb, ssl, bz2. Yes, I know it was written in readme about how to build them. But I have not understood where I can download their source codes? And how to integrate that in the solution? Second question. After built python, how to install them into specified folder? I tried to simply move the executables into another folder. Create libs, Lib, and DLLs folders just normally I saw in Python for Windows distribution and move compiled libraries and pyd files into those. But when I tried to run >>> import sqlite3 Intrepreter respond was: no _sqlite3. But I noticed if I moved _sqlite3.lib into a same folder with python.exe, then it worked well. Did I miss something? So how is the correct way to copy compiled executables, libraries dan pyds into a specified folder? Thanks, --- Mico | mico_siahaan at yahoo.com | pakaipython.blogspot.com | @bangmico From brian.curtin at gmail.com Fri Sep 10 15:53:14 2010 From: brian.curtin at gmail.com (Brian Curtin) Date: Fri, 10 Sep 2010 08:53:14 -0500 Subject: [python-win32] Building and Installing Python from source In-Reply-To: <1364835845-1284104206-cardhu_decombobulator_blackberry.rim.net-673306589-@bda051.bisx.prodap.on.blackberry> References: <1364835845-1284104206-cardhu_decombobulator_blackberry.rim.net-673306589-@bda051.bisx.prodap.on.blackberry> Message-ID: On Fri, Sep 10, 2010 at 02:36, Mico Siahaan wrote: > Dear all, > > sorry for these basic questions. I downloaded python source then I built > python executable using pcbuild.sln in PCBuild folder as stated in > readme.txt. > > I built most of them successfully except tkinter, bsdbb, ssl, bz2. Yes, I > know it was written in readme about how to build them. But I have not > understood where I can download their source codes? And how to integrate > that in the solution? > There's a note explaining that Tools\buildbot\external(-amd64).bat will get the source for those subprojects. Run that batch from the top level of your checkout. You'll need to do a few additional things for ssl which are laid out in that readme. Second question. After built python, how to install them into specified > folder? I tried to simply move the executables into another folder. Create > libs, Lib, and DLLs folders just normally I saw in Python for Windows > distribution and move compiled libraries and pyd files into those. But when > I tried to run > >>> import sqlite3 > > Intrepreter respond was: no _sqlite3. > > But I noticed if I moved _sqlite3.lib into a same folder with python.exe, > then it worked well. Did I miss something? So how is the correct way to copy > compiled executables, libraries dan pyds into a specified folder? > You might be interested in the Tools\msi folder to create your own installer. However, I've never had success with this, so I'm afraid I can't really help there. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mgnt at cas.pl Thu Sep 16 00:04:28 2010 From: mgnt at cas.pl (Jerzy Wolowik) Date: Thu, 16 Sep 2010 00:04:28 +0200 Subject: [python-win32] Unexpected delay in printing with win32print Message-ID: <4C9142EC.8020300@cas.pl> Dear list members, I'm using Python 2.5.2 running on Win2k. I've just try one of Tim Golden's "Win32 How Do I" hints. Those on printing with win32print - Spooler API wraper. The problem? The problem is a huge delay in printing - about two to four minutes. I'm printing to HP LJ 1320 connected via USB port or print server attached to parallel port. Can You explain the cause and perhaps point me out to solution or workaround? Sincerely Your's Here's the code: import win32print printer_name = win32print.GetDefaultPrinter () # # raw_data could equally be raw PCL/PS read from # some print-to-file operation # raw_data = "This is a test" hPrinter = win32print.OpenPrinter (printer_name) try: hJob = win32print.StartDocPrinter (hPrinter, 1, ("test of raw data", None, "RAW")) try: win32print.WritePrinter (hPrinter, raw_data) finally: win32print.EndDocPrinter (hPrinter) finally: win32print.ClosePrinter (hPrinter) From mail at timgolden.me.uk Thu Sep 16 18:47:13 2010 From: mail at timgolden.me.uk (Tim Golden) Date: Thu, 16 Sep 2010 17:47:13 +0100 Subject: [python-win32] Unexpected delay in printing with win32print In-Reply-To: <4C9142EC.8020300@cas.pl> References: <4C9142EC.8020300@cas.pl> Message-ID: <4C924A11.3080501@timgolden.me.uk> On 15/09/2010 11:04 PM, Jerzy Wolowik wrote: > I'm using Python 2.5.2 running on Win2k. > > > I've just try one of Tim Golden's "Win32 How Do I" > hints. Those on printing with win32print - Spooler API > wraper. > > > The problem? The problem is a huge delay in printing - > about two to four minutes. I'm printing to HP LJ 1320 > connected via USB port or print server attached to > parallel port. > > Here's the code: > > import win32print > printer_name = win32print.GetDefaultPrinter () > # > # raw_data could equally be raw PCL/PS read from > # some print-to-file operation > # > raw_data = "This is a test" > > hPrinter = win32print.OpenPrinter (printer_name) > try: > hJob = win32print.StartDocPrinter (hPrinter, 1, > ("test of raw data", None, "RAW")) > try: > win32print.WritePrinter (hPrinter, raw_data) > finally: > win32print.EndDocPrinter (hPrinter) > finally: > win32print.ClosePrinter (hPrinter) Can't see anything obvious. By sheer chance, since I'm away from home at the mo, the only machine I have access to is a Win2k machine with Python 2.5.2 on it attached to an HP LaserJet 1018. I'm just downloading the pywin32 extensions over a painfully slow ADSL line and I'll see if I can reproduce. I doubt very much if it's anything in the code; might *just* be some bizarre thing to do with not pushing enough data through the buffer although I would have thought that that would have caused it *never* to print. Anyway... TJG From mgnt at cas.pl Thu Sep 16 21:29:45 2010 From: mgnt at cas.pl (Jerzy Wolowik) Date: Thu, 16 Sep 2010 21:29:45 +0200 Subject: [python-win32] Unexpected delay in printing with win32print In-Reply-To: <4C924A11.3080501@timgolden.me.uk> References: <4C924A11.3080501@timgolden.me.uk> Message-ID: <4C927029.901@cas.pl> First, thank a lot for Your attention. Please don't hesitate to put digging into that problem off for a while. Until You'll back home at least. It's not so burning. The problem as whole is not so common this days, I think. What I'm trying to do is to find the simplest way of printing high volume of textual data - a long tables containing scientific data (sometimes hundreds of pages). Portability is important issue for that job. And portability in this case means both ability to run the app on Unix, Linux and Win and sending printouts to page as well as to line printers. I'm trying to achieve this through simplicity. I want to pass over the whole DC machinery usually involved in drawing and printing to paged media. Any thoughts, comments would be welcome. Sincerely Yours Jerzy Wolowik From planders at gmail.com Fri Sep 17 01:31:14 2010 From: planders at gmail.com (Preston Landers) Date: Thu, 16 Sep 2010 18:31:14 -0500 Subject: [python-win32] Unexpected delay in printing with win32print In-Reply-To: <4C927029.901@cas.pl> References: <4C924A11.3080501@timgolden.me.uk> <4C927029.901@cas.pl> Message-ID: Have you considered outputting your raw data to a portable file format like HTML, PDF, etc and then printing these outside of Python? Just a thought. -Preston On Thu, Sep 16, 2010 at 2:29 PM, Jerzy Wolowik wrote: > First, thank a lot for Your attention. Please don't hesitate to put digging > into that problem off for a while. Until You'll back home at least. It's not > so burning. > > > The problem as whole is not so common this days, I think. What I'm trying > to do is to find the simplest way of printing high volume of textual data - > a long tables containing scientific data (sometimes hundreds of pages). > > > Portability is important issue for that job. And portability in this case > means both ability to run the app on Unix, Linux and Win and sending > printouts to page as well as to line printers. > > > I'm trying to achieve this through simplicity. I want to pass over the > whole DC machinery usually involved in drawing and printing to paged media. > > > Any thoughts, comments would be welcome. > > > > > Sincerely Yours > > Jerzy Wolowik > > _______________________________________________ > python-win32 mailing list > python-win32 at python.org > http://mail.python.org/mailman/listinfo/python-win32 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jn.ml.pyw32.88 at wingsandbeaks.org.uk Fri Sep 17 02:15:41 2010 From: jn.ml.pyw32.88 at wingsandbeaks.org.uk (Jeremy Nicoll - ml pyw32) Date: Fri, 17 Sep 2010 01:15:41 +0100 Subject: [python-win32] Unexpected delay in printing with win32print In-Reply-To: <4C9142EC.8020300@cas.pl> References: <4C9142EC.8020300@cas.pl> Message-ID: Jerzy Wolowik wrote: > Dear list members, > > > I'm using Python 2.5.2 running on Win2k. > > > I've just try one of Tim Golden's "Win32 How Do I" > hints. Those on printing with win32print - Spooler API > wraper. > > > The problem? The problem is a huge delay in printing - > about two to four minutes. I'm printing to HP LJ 1320 > connected via USB port or print server attached to > parallel port. > > > Can You explain the cause and perhaps point me out to > solution or workaround? I would guess that the printer is waiting to see if more data is going to be sent and eventually - after a timeout - deciding not. Looks to me as if your test data needs at least a carriage-return to mark the end of a line, and more to the point something (but I'm not sure what) to mark end of page. It might just be an EOF character. Failing that some PCL command sequence, perhaps? It might be worth doing a pront to file of some simple plain text document and then looking at the printout file to see what else is in it. Conceivably if you sent one long string of test data, where the volume of text was more than one page's worth, you'd see the first page print immediately and then a long delay for the second page. -- Jeremy C B Nicoll - my opinions are my own. From niki at vintech.bg Fri Sep 17 09:15:11 2010 From: niki at vintech.bg (niki) Date: Fri, 17 Sep 2010 10:15:11 +0300 Subject: [python-win32] Unexpected delay in printing with win32print In-Reply-To: References: <4C9142EC.8020300@cas.pl> Message-ID: <4C93157F.2050907@vintech.bg> On 17.09.2010 03:15, Jeremy Nicoll - ml pyw32 wrote: > > I would guess that the printer is waiting to see if more data is going to be > sent and eventually - after a timeout - deciding not. Looks to me as if > your test data needs at least a carriage-return to mark the end of a line, > and more to the point something (but I'm not sure what) to mark end of page. > It might just be an EOF character. Maybe FF (form feed)? HTH Niki From breucking at gonicus.de Fri Sep 17 11:51:39 2010 From: breucking at gonicus.de (Patrick Breucking) Date: Fri, 17 Sep 2010 11:51:39 +0200 Subject: [python-win32] Retrieve User Entry IDs from MAPI Message-ID: <731530C9-2580-4255-A9EC-039826707310@gonicus.de> Hi folks, I extended the win32comext MAPI with the Interface IExchangeModifyTable to edit ACLs via the MAPI. I can modify existing ACL entries, but I stuck in adding new entries. I need the users entry ID to add it, according this C example (http://support.microsoft.com/?scid=kb%3Ben-us%3B297493&x=14&y=15) STDMETHODIMP AddUserPermission( LPSTR szUserAlias, LPMAPISESSION lpSession, LPEXCHANGEMODIFYTABLE lpExchModTbl, ACLRIGHTS frights) { HRESULT hr = S_OK; LPADRBOOK lpAdrBook; ULONG cbEid; LPENTRYID lpEid = NULL; SPropValue prop[2] = {0}; ROWLIST rowList = {0}; char szExName[MAX_PATH]; // Replace with "/o=OrganizationName/ou=SiteName/cn=Recipients/cn=" char* szServerDN = "/o=org/ou=site/cn=Recipients/cn="; strcpy(szExName, szServerDN); strcat(szExName, szUserAlias); // Open the address book. hr = lpSession->OpenAddressBook(0, 0, MAPI_ACCESS_MODIFY, &lpAdrBook ); if ( FAILED( hr ) ) goto cleanup; // Obtain the entry ID for the recipient. hr = HrCreateDirEntryIdEx(lpAdrBook, szExName, &cbEid, &lpEid); if ( FAILED( hr ) ) goto cleanup; prop[0].ulPropTag = PR_MEMBER_ENTRYID; prop[0].Value.bin.cb = cbEid; prop[0].Value.bin.lpb = (BYTE*)lpEid; prop[1].ulPropTag = PR_MEMBER_RIGHTS; prop[1].Value.l = frights; rowList.cEntries = 1; rowList.aEntries->ulRowFlags = ROW_ADD; rowList.aEntries->cValues = 2; rowList.aEntries->rgPropVals = &prop[0]; hr = lpExchModTbl->ModifyTable(0, &rowList); if(FAILED(hr)) goto cleanup; printf("Added user permission. \n"); cleanup: if (lpAdrBook) lpAdrBook->Release(); return hr; } I can open the Address Book, but HrCreateDirEntryIdEx is not provided in the pywin32 mapi. I found it in the exchange extension, which does not compile on my system, the missing library problem. Do you have any idea to retrieve the users entry ID? Thank. - Patrick From mgnt at cas.pl Fri Sep 17 21:36:46 2010 From: mgnt at cas.pl (Jerzy Wolowik) Date: Fri, 17 Sep 2010 21:36:46 +0200 Subject: [python-win32] Unexpected delay in printing with win32print In-Reply-To: <4C93157F.2050907@vintech.bg> References: <4C93157F.2050907@vintech.bg> Message-ID: <4C93C34E.5010401@cas.pl> Yes, it's FF (Form Feed) what's doing the job. The real and unexpected problem is ... just weak documentation on that topic from the Microsoft. Dealing with Spool API (as it's called in MS docs) is just only skimmed. Even Petzold skim over it! Great thanks to all of You trying to help. For a guy who's back in system programming ;) after fifteen years or so fighting such problems it's traumatic experience. Once again, thanks a lot. Sincerely Yours Jerzy Wolowik From mail at timgolden.me.uk Mon Sep 20 10:28:59 2010 From: mail at timgolden.me.uk (Tim Golden) Date: Mon, 20 Sep 2010 09:28:59 +0100 Subject: [python-win32] Unexpected delay in printing with win32print In-Reply-To: <4C93C34E.5010401@cas.pl> References: <4C93157F.2050907@vintech.bg> <4C93C34E.5010401@cas.pl> Message-ID: <4C971B4B.7040203@timgolden.me.uk> On 17/09/2010 20:36, Jerzy Wolowik wrote: > Yes, it's FF (Form Feed) what's doing the job. Thanks for letting us know. Hope things go more smoothly for you now :) TJG From julio.dilisa at thalesaleniaspace.com Wed Sep 29 13:04:32 2010 From: julio.dilisa at thalesaleniaspace.com (julio.dilisa at thalesaleniaspace.com) Date: Wed, 29 Sep 2010 13:04:32 +0200 Subject: [python-win32] Can't change default script host:::after installing pywin32 Message-ID: <16529_1285758273_4CA31D41_16529_42222_1_OF9B4CCA31.F72576A3-ONC12577AD.003C19E1-C12577AD.003CD71F@thalesaleniaspace.com> Hello, After installation of pywin32-214.win32-py2.7.exe,I got regularly the message "Windows Script Host --- Can't change default script host." Before installing pywin32-214.win32-py2.7.exe, I could do (as admin) : wscript //H:cscript and got the message saying it was ok. (also the same command with cscript). What is the problem ? What can I do to get rid of this message ? I work with Windows XP SP3. Regards Julio DILISA THALES ALENIA SPACE ETCA s.a. -------------- next part -------------- An HTML attachment was scrubbed... URL: From python at bdurham.com Thu Sep 30 18:09:16 2010 From: python at bdurham.com (python at bdurham.com) Date: Thu, 30 Sep 2010 12:09:16 -0400 Subject: [python-win32] Simple Windows progressbar dialog (like messagebox) via Win32 API? Message-ID: <1285862956.22785.1397713153@webmail.messagingengine.com> I know there is a simple interface to the Windows messagebox interface. Is there an equivalent type of simple dialog box for showing a progressbar or progressbar-like information? Use case: I have a collection of Python command line utilties that can take up to several minutes to run. These are utilities may be called from other applications. Our users have asked whether these utilities can display a progressbar while they are running. Our utilities are very lean right now and easy to distribute and support. We would like to avoid having to use Tkinter or large GUI frameworks like wxPython and pyQt if at all possible. Thank you, Malcolm -------------- next part -------------- An HTML attachment was scrubbed... URL: From A.Holtz at gmx.net Thu Sep 30 19:44:55 2010 From: A.Holtz at gmx.net (Andreas Holtz) Date: Thu, 30 Sep 2010 19:44:55 +0200 Subject: [python-win32] win32api: How to send WM_SIZING to a Window Message-ID: <4CA4CC97.60700@gmx.net> Hello, I have a program which I can control via COM and Python's win32com. This program will visualize a big tree, which gets created by my COM-commands. The problem is, that after each modification of the tree (like insert), the program refreshes its display area. Accidentally I discovered when you click on the window of the program to change its size, as long as I don't lift the mouse button, the refresh of the display area is suspended and the performance of the tree creation increases by factor 10. So my idea is now to simulate this event. When I use win32api.mouse_event(...) with the correct location in the window, it works, but I can't use the mouse. Because Windows thinks the left mouse button is pressed, all movement will change the size of the window. Clicking again will release the connection to the window and the performance will drop again. I also tried win32gui.MoveWindow(...) and win32api.SetWindowPos(...). But both behave like clicking the window, move the mouse and release the mouse button. So, this does not work! My idea now is to send the WM_SIZING event to the window. So I tried something like win32api.SendMessage(hdnl, win32con.WM_SIZING, win32con.WMSZ_BOTTOM, "0 0 100 100") This returns 0 and nothing happens. The last param should be a RECT. I found info about a PyRECT class (see http://timgolden.me.uk/pywin32-docs/PyRECT.html) but I am not experienced enough to create an object from it ( in this moment I saw that the ctypes.wintypes has this class :-( ). So I tried to create a RECT structure (which looked like the one from ctypes.wintypes) but as result I got an exception saying that the last param needs to be a String, int or buffer (there is a typo in the exception ;) ). So I tried to give the rect byref, but this gave me the same exception. So, can someone explain me how to send this event to the window? Or perhaps my idea is total idiotic and one can archive this easy by a differnet way? Thanks in advance Andreas From timr at probo.com Thu Sep 30 20:14:16 2010 From: timr at probo.com (Tim Roberts) Date: Thu, 30 Sep 2010 11:14:16 -0700 Subject: [python-win32] win32api: How to send WM_SIZING to a Window In-Reply-To: <4CA4CC97.60700@gmx.net> References: <4CA4CC97.60700@gmx.net> Message-ID: <4CA4D378.1030102@probo.com> Andreas Holtz wrote: > I have a program which I can control via COM and Python's win32com. > This program will visualize a big tree, which gets created by my COM-commands. > The problem is, that after each modification of the tree (like insert), the program > refreshes its display area. > > Accidentally I discovered when you click on the window of the program > to change its size, as long as I don't lift the mouse button, the refresh of the display > area is suspended and the performance of the tree creation increases by factor 10. > > So my idea is now to simulate this event. Most similar COM controls have APIs to suspend drawing while you make large scale changes. Sometimes it's called freeze and thaw, sometimes suspend and resume, sometimes other similar words are used. Have you looked carefully through the COM interface to see if there is an interface like that? Is this some well-known program? Perhaps one of us can take a look at the interface. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From timr at probo.com Thu Sep 30 20:20:48 2010 From: timr at probo.com (Tim Roberts) Date: Thu, 30 Sep 2010 11:20:48 -0700 Subject: [python-win32] Simple Windows progressbar dialog (like messagebox) via Win32 API? In-Reply-To: <1285862956.22785.1397713153@webmail.messagingengine.com> References: <1285862956.22785.1397713153@webmail.messagingengine.com> Message-ID: <4CA4D500.2080505@probo.com> python at bdurham.com wrote: > I know there is a simple interface to the Windows messagebox interface. > > Is there an equivalent type of simple dialog box for showing a > progressbar or progressbar-like information? > > Use case: I have a collection of Python command line utilties that can > take up to several minutes to run. These are utilities may be called > from other applications. Our users have asked whether these utilities > can display a progressbar while they are running. > > Our utilities are very lean right now and easy to distribute and > support. We would like to avoid having to use Tkinter or large GUI > frameworks like wxPython and pyQt if at all possible. There are no progress dialogs built-in to Windows. If you look in site-packages\pythonwin\pywin\Demos, you'll find "progressbar.py". This is a Python wrapper around the MFC CProgressCtrl class. You might be able to adapt that to do what you need, although I'm not sure MFC is any lighter weight than Tkinter. There is a collection of useful dialogs for non-gui programs called "easygui.py". Although it doesn't have a progress bar, perhaps their philosophy might help you. It uses Tkinter. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From timr at probo.com Thu Sep 30 23:12:52 2010 From: timr at probo.com (Tim Roberts) Date: Thu, 30 Sep 2010 14:12:52 -0700 Subject: [python-win32] win32api: How to send WM_SIZING to a Window In-Reply-To: <4CA4F70B.9000902@gmx.net> References: <4CA4CC97.60700@gmx.net> <4CA4D378.1030102@probo.com> <4CA4F70B.9000902@gmx.net> Message-ID: <4CA4FD54.8080502@probo.com> Andreas Holtz wrote: > The program is CATIA from Dassault. > They have a parameter to control the refresh of > the display (CATIAApplication.RefreshDisplay = False) but this > only works within their macro engine. For details see here: > http://ww3.cad.de/foren/ubb/Forum137/HTML/001099.shtml#000002 Have you tried it? That's exactly the switch you need. Although I don't speak German, there's also a reference to an "Interactive" property that might help you. (I believe their explanation is justifying a bug, not describing necessary behavior. Many COM servers handle this just fine.) Beyond that, you're just hacking, and you'll need to experiment. -- Tim Roberts, timr at probo.com Providenza & Boekelheide, Inc. From A.Holtz at gmx.net Thu Sep 30 23:32:35 2010 From: A.Holtz at gmx.net (Andreas Holtz) Date: Thu, 30 Sep 2010 23:32:35 +0200 Subject: [python-win32] win32api: How to send WM_SIZING to a Window Message-ID: <4CA501F3.8010107@gmx.net> The program is CATIA from Dassault. They have a parameter to control the refresh of the display (CATIAApplication.RefreshDisplay = False) but this only works within their macro engine. For details see here: http://ww3.cad.de/foren/ubb/Forum137/HTML/001099.shtml#000002 schrieb Tim Roberts am 30.09.2010 20:14: > Andreas Holtz wrote: >> I have a program which I can control via COM and Python's win32com. >> This program will visualize a big tree, which gets created by my COM-commands. >> The problem is, that after each modification of the tree (like insert), the program >> refreshes its display area. >> >> Accidentally I discovered when you click on the window of the program >> to change its size, as long as I don't lift the mouse button, the refresh of the display >> area is suspended and the performance of the tree creation increases by factor 10. >> >> So my idea is now to simulate this event. > > Most similar COM controls have APIs to suspend drawing while you make > large scale changes. Sometimes it's called freeze and thaw, sometimes > suspend and resume, sometimes other similar words are used. Have you > looked carefully through the COM interface to see if there is an > interface like that? > > Is this some well-known program? Perhaps one of us can take a look at > the interface. > From A.Holtz at gmx.net Thu Sep 30 23:38:34 2010 From: A.Holtz at gmx.net (Andreas Holtz) Date: Thu, 30 Sep 2010 23:38:34 +0200 Subject: [python-win32] win32api: How to send WM_SIZING to a Window In-Reply-To: <4CA4FD54.8080502@probo.com> References: <4CA4CC97.60700@gmx.net> <4CA4D378.1030102@probo.com> <4CA4F70B.9000902@gmx.net> <4CA4FD54.8080502@probo.com> Message-ID: <4CA5035A.2060805@gmx.net> Of course I tried it and it is not working. I am trying for two days now. The Interactive-switch is just preventing user inputs (this works fine). The COM implementation is "suboptimal". There are a lot of features you can not access via COM. Don't ask me why. Due to this suboptimal behaviour, I need this stupid hack. The question is now, what is a correct WM_SIZING-message? With a string for the rect, a RECT-object, two words or something else? It can't be possible that I am the first person sending a WM_SIZING-message to a window in python? schrieb Tim Roberts am 30.09.2010 23:12: > Andreas Holtz wrote: >> The program is CATIA from Dassault. >> They have a parameter to control the refresh of >> the display (CATIAApplication.RefreshDisplay = False) but this >> only works within their macro engine. For details see here: >> http://ww3.cad.de/foren/ubb/Forum137/HTML/001099.shtml#000002 > > Have you tried it? That's exactly the switch you need. Although I > don't speak German, there's also a reference to an "Interactive" > property that might help you. > > (I believe their explanation is justifying a bug, not describing > necessary behavior. Many COM servers handle this just fine.) > > Beyond that, you're just hacking, and you'll need to experiment. > From cappy2112 at gmail.com Thu Sep 30 23:56:56 2010 From: cappy2112 at gmail.com (Tony Cappellini) Date: Thu, 30 Sep 2010 14:56:56 -0700 Subject: [python-win32] Simple Windows progressbar dialog (like messagebox) via Win32 API? Message-ID: Message: 1 Date: Thu, 30 Sep 2010 12:09:16 -0400 From: python at bdurham.com To: "zz Python Win32 Newsgroup" Subject: [python-win32] Simple Windows progressbar dialog (like messagebox) via Win32 API? Message-ID: <1285862956.22785.1397713153 at webmail.messagingengine.com> Content-Type: text/plain; charset="us-ascii" >>I know there is a simple interface to the Windows messagebox >>interface. Try Easy Dialogs http://www.averdevelopment.com/python/EasyDialogs.html It have a progress bar. Easy Dialogs just wraps the native OS calls, and makes them sensible & cross platform. Using a progress bar is only a few lines of code.