Re: [python-win32] error importing win32com for Dispatch

2011-02-01 Thread Amelie Lesser
2011/1/31 Vernon Cole > Don't use the ZIP file. It is a pain to install, and (as you see) sometimes > does not install correctly. Unfortunately, sourceforge sets it as the > default thing to do. What you want to do is push the "view all files" > button

Re: [python-win32] Problem with msvcr90.dll

2011-02-01 Thread Tefnet Developers
Dnia 2011-02-01, wto o godzinie 10:44 +1100, Mark Hammond pisze: > This stuff is painful and poorly documented. Is it possible the code > which triggers the failing import is on a different thread than the one > which loaded Python? I have added a little thread id reporting function: static v

Re: [python-win32] Problem with msvcr90.dll

2011-02-01 Thread Tefnet Developers
Dnia 2011-02-01, wto o godzinie 10:44 +1100, Mark Hammond pisze: > This stuff is painful and poorly documented. Is it possible the code > which triggers the failing import is on a different thread than the one > which loaded Python? If so, I suspect the magic done by Python in > dl_nt.c may no

[python-win32] How to specify parameters in a query using odbc

2011-02-01 Thread Tom Hawkins
Hi, I'm trying to get data out of a MS SQL Server 2005 database from a Python 2.5 script, using the odbc module - I can't easily get anything more up-to-date installed on this system. If I specify the query literally, like this: import dbi, odbc myQuery = """SELECT EnteredValue FROM

Re: [python-win32] How to specify parameters in a query using odbc

2011-02-01 Thread Tim Roberts
Tom Hawkins wrote: > > > > I’m trying to get data out of a MS SQL Server 2005 database from a > Python 2.5 script, using the odbc module - I can’t easily get anything > more up-to-date installed on this system. > > ... > > ...it works OK, but if I try to parameterise the query:Any idea what > I’m

Re: [python-win32] How to specify parameters in a query using odbc

2011-02-01 Thread Paul Koning
My impression (but I admit the documentation could be better) is that parameters on the execute call only apply to data values of INSERT statements. For any other variable bits, format them into the command string (with the % operator and appropriate %s/%d/%x etc. elements in the string). So I

Re: [python-win32] How to specify parameters in a query using odbc

2011-02-01 Thread Vernon Cole
Tim's answer is correct. A db api connection object supplies a .paramstyle method which specifies which of _five_ different parameter substitution methods is used by the underlying query engine. odbc uses 'qmark', meaning that you put ? where you want parameters to appear. You may have something

Re: [python-win32] How to specify parameters in a query using odbc [SEC=PERSONAL]

2011-02-01 Thread Andrew MacIntyre
The odbc module in Pythonwin uses qmark parameter style I believe, so use ? instead of %s for parameter substitution. -> "These thoughts are mine alone!" <- Andrew MacIntyre Operations Branch tel: +61 2 6219 5356 Communications Infrastructure Di

[python-win32] Find containing window given a control handle

2011-02-01 Thread Reckoner
Hi, Given the handle of a text field or button embedded in some window, how can I find the parent window that contains the handle? Right now, I'm exhaustively going through every visible window and matching every child handle. Perhaps there is a better way? Thanks! __

Re: [python-win32] Find containing window given a control handle

2011-02-01 Thread Greg Ewing
Reckoner wrote: Given the handle of a text field or button embedded in some window, how can I find the parent window that contains the handle? Use the win32gui.GetParent() function? -- Greg ___ python-win32 mailing list [email protected] http:

[python-win32] PyWin32 has stopped working/mfc90.dll error

2011-02-01 Thread Lance Case
I’ve installed the standard ‘pywin32-212’ app that comes with ESRI’s ArcGIS 10. Pythonwin.exe ran fine for me for a while, but I’ve somehow managed to break it. I’m getting “PyWin32 has stopped working”. When I check the Event Application log, the error says “Faulting module path: C:\Windows\WinSxS

Re: [python-win32] PyWin32 has stopped working/mfc90.dll error

2011-02-01 Thread Mark Hammond
The best I can think of is that somehow the toolbar states or other preferences are causing the problem - try deleting the registry key HKEY_CURRENT_USER\Software\Python 2.6\Python for Win32 and see if that helps. Mark On 2/02/2011 2:33 PM, Lance Case wrote: I’ve installed the standard ‘pywi