Re: [python-win32] speed of win32com versus comtypes

2011-01-26 Thread Mark Hammond
On 26/01/2011 3:38 PM, Brad Buran wrote: I've been using win32com.client for the past year or so. Recently, I noticed that there was a bottleneck in my code, and I tracked this down to _get_good_single_object (line 478). When using comtypes instead of win32com.client, calling the ReadTagVEX met

[python-win32] speed of win32com versus comtypes

2011-01-26 Thread Brad Buran
I've been using win32com.client for the past year or so. Recently, I noticed that there was a bottleneck in my code, and I tracked this down to _get_good_single_object (line 478). When using comtypes instead of win32com.client, calling the ReadTagVEX method on my COM object is 4.8 times faster so

Re: [python-win32] Problem with win32com and scikits timeseries

2011-01-26 Thread Mark Hammond
On 24/01/2011 11:30 PM, Mauro wrote: Hello, I get the following error when importing Date from scikits.timeseries. The error is there only when I interface python with Excel using COM. It is enough to import anything from scikits.timeseries to get the error. Any help? I am using Python2.7 and s

Re: [python-win32] win32com + Excel + Django + Apache = problem

2011-01-26 Thread Mark Hammond
Oops - I didn't see this reply when I posted mine. On 26/01/2011 5:34 AM, user wrote: This line it's not a "copy past" from my source. In the code every path is ok, I checked many times. I suggest you modify your code to the smallest example which demonstrates the problem, then copy-paste it

Re: [python-win32] win32com + Excel + Django + Apache = problem

2011-01-26 Thread Mark Hammond
On 26/01/2011 8:51 AM, cricogik wrote: > Does that user have access to that path? Yes, apache has full access. It's problem in win32com Are you sure about that? because when I add before calling Workbooks.Open: open("C:\\path\\to\\file.xlsx") application won't crash, so apache can ope

Re: [python-win32] win32com + Excel + Django + Apache = problem

2011-01-26 Thread cricogik
> Does that user have access to that path? Yes, apache has full access. It's problem in win32com, because when I add before calling Workbooks.Open: open("C:\\path\\to\\file.xlsx") application won't crash, so apache can open/read/write this file. Also when I running application under django de

Re: [python-win32] Fixing type ID for an interface file generated by makepy

2011-01-26 Thread Brad Buran
Ok! I'll install Visual Studio and see if I can make any headway. Thanks for your help! Brad On Wed, Jan 26, 2011 at 5:44 AM, Graham Bloice wrote: > On 25/01/2011 06:44, Brad Buran wrote: > > When I generate the interface file for a COM object using makepy, it > generates an incorrect signature

Re: [python-win32] win32com + Excel + Django + Apache = problem

2011-01-26 Thread user
This line it's not a "copy past" from my source. In the code every path is ok, I checked many times. 2011/1/26 Mike Mazurek > C:\\path\to\\file.xlsx" <-- you need another back slash before the "to" > > On Wed, Jan 26, 2011 at 9:09 AM, user wrote: > >> >> Hello, >> >> I have some problems while

Re: [python-win32] win32com + Excel + Django + Apache = problem

2011-01-26 Thread Randy Syring
I don't know much of anything about COM or multi-threading in Apache, but the error seems to indicate a permissions problem. What system user is Apache running under? Does that user have access to that path? Another option is to use "run as" to open a command prompt as the same system user t

[python-win32] win32com + Excel + Django + Apache = problem

2011-01-26 Thread user
Hello, I have some problems while opening Excel (via win32com) document in a web application running under Apache(mod_wsgi)/Windows 2008 Server (there is no problem when the application is running on django developer server - one thread). My code: def my_view(request): import pythoncom

Re: [python-win32] Fixing type ID for an interface file generated by makepy

2011-01-26 Thread Graham Bloice
On 25/01/2011 06:44, Brad Buran wrote: > When I generate the interface file for a COM object using makepy, it > generates an incorrect signature for one of the methods: > > def ReadTag(self, Name=defaultNamedNotOptArg, > pBuf=defaultNamedNotOptArg, nOS=defaultNamedNotOptArg, > nWords=defaultNamedNo

Re: [python-win32] odbc under windows 7?

2011-01-26 Thread Graham Bloice
On 24/01/2011 18:46, Tim Roberts wrote: > Gary L Smith wrote: >> >> >> I need to access data in an MS Access 2003 database using Python 2.5 >> or 2.6 running in Windows7. Windows7 doesn’t seem to have appropriate >> drivers for ODBC. My error messages consistently contain the phrase, >> “Data s