You could always put your GUI in a different Python process
and use sockets to pass events in the form of pickled objects
back and forth.

I may make this my default way of doing things given the
problems integrating components that all want to be
the boss... (Plus you get the option of running the
GUI on a different machine than your server if you want to.)

m

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Mark
Hammond
Sent: Wednesday, October 31, 2001 4:04 PM
To: Nikolai Kirsebom; [EMAIL PROTECTED]
Subject: RE: Using win32ui in COM-server


The short answer is that it is not possible for a Python COM object to have
a GUI - this would require it to be an ActiveX control, and Python doesn't
quite do that yet.

A common technique is to write the GUI itself in VB, and expose a Python COM
server that does all the hard work.  The VB code can use the Python COM
server - and indeed VB can pass its "Form" and other GUI objects into Python
where it can be directly manipulated.  "Python Programming on Win32" has a
small example of this.

Hope this helps,

Mark.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Nikolai
> Kirsebom
> Sent: Thursday, 1 November 2001 6:48 AM
> To: [EMAIL PROTECTED]
> Subject: Using win32ui in COM-server
>
>
> This has been posted to c.l.p.  Posting it here also in the hope
> that someone can point me to where to look.
>
>
> We have an application (written in C++/MFC/T-SQL) where we use Word
> (MS) as an editor. Word is started by our application as a COM-server
> (automation). When started, Word with all its features/functions
> (except some programmatically removed functions) is available to the
> user. Word is started "Modally" - the rest of our application is
> frozen while Word is active. Some parameterisation of Word is done
> from our application (by using the object model Word exposes). Some
> features implemented in VBA make it possible for the user to extract
> information for the database. This is done by calling back into our
> application (which then actually acts as a COM-server to Word), which
> again accesses the database (use the current db connection).
>
> Now to the question. Does anyone know if it is possible to develop a
> python based COM-server which also has a GUI (based on win32ui or
> maybe wxPython) working principally like described above. I've tried
> using the simple COM-server examples from M.Hammond/Andy Robinsons
> book, however I'm not able to have the GUI created.
>
> Thanks for any help/hints.
>
> Nikolai Kirsebom
>
>
>
> _______________________________________________
> ActivePython mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/activepython

_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython

_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activepython

Reply via email to