problem running win32com.client application from commandline

Mark Hammond mhammond at skippinet.com.au
Mon Apr 15 03:41:16 EDT 2002


Tino Lange wrote:
> Hi All!
> 
> I just discovered a problem with a win32com.client based application.
> 
> If I initialize the object 
> acheck = win32com.client.Dispatch(com_name)
> from pythonwin it's no problem at all. The application runs and does
> everything I want it to do for me :-)
> 
> But if I use it from the commandline (either python.exe or
> pythonw.exe) then the above initialization of the COM-Object fails. A
> MessageBox appears (from the COM-Object, Method
> "UserControl_Initialize") telling that there's not enough memory to
> initialize.
> 
> Unfortunately I just have the OCX - I cannot look in the COM-Object
> :-(
> 
> Any idea? What's different, when I run the script via PythonWin?
> Is there a possibility to run commandline-scripts?
> 

Pythonwin contains the code necessary to host true OCX controls.  You 
can't do this in python.exe or wpython.exe.  You may still be able to 
get what you need by using "pythonwin.exe /nodde /run foo.py"

Mark.




More information about the Python-list mailing list