VB6 frontend GUI with Python

Ryan Ginstrom software at ginstrom.com
Tue Nov 20 06:32:10 EST 2007


> On Behalf Of Claire Blair
> I am trying to write a VB6 (not VB.Net) application that has 
> a console window that allows Python command to be typed at the prompt.

I'm not sure what pieces of the puzzle you're missing. Were you able to
create a simple COM server with Python?

At a conceptual level, how about this:

* Your VB form creates an instance of the Python COM server
* You pass a reference to the form to the COM server (server.SetForm Me
'etc...)
* You have a textbox in your VB form. You listen for Return key events
* When you get a return key, you call a method on the COM server that says
"submit text line"
* The COM server examines the last line of text in the form's text box, and
takes any necessary action, including:
  + Eval a line of interactive Python code
  + Write a result to the VB form's text box

Do the above steps sound feasible?

Regards,
Ryan Ginstrom




More information about the Python-list mailing list