problem running win32com.client application from commandline
Tino Lange
tl_news at nexgo.de
Mon Apr 15 06:09:22 EDT 2002
Mark Hammond wrote:
>> I just discovered a problem with a win32com.client based application.
>> [...]
>> Any idea? What's different, when I run the script via PythonWin?
> 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"
Hi Marc,
thanks a lot for your reply!
Great solution - so I just run my script with a (hidden) PythonWin instead
of python.exe and everything is fine.
Is there a list of those useful commandline-switches for PythonWin
available? A "PythonWin.exe /?" or "PythonWin.exe --help" does not help.
Just one more question - it seems that this OCX I want to script via python
has a form attached, that is filled under some circumstances - the return
value of the called function via COM is then not enough for me.
>From looking at the Word-Macro that uses the OCX originally I can see that
there are some global variables shared between Word VBA and the OCX. Also
there's this form that s the same in Word and in the OCX. Those global
variables and the form are not accessible via the COM-Interface, but the
Word Macro seems to have access. (at least the makepy generated file does
not list them).
Is there a way to get the form-handle and have access to the form and for
example some textual content?
Thanks a lot.
Tino
More information about the Python-list
mailing list