Implementing PythonWin console from a Visual Basic application!

Mark Hammond mhammond at skippinet.com.au
Mon Feb 4 07:33:10 EST 2002


codetube wrote:
> Hello Everyone,
> 
> I wonder if any one knows some thing about implementing the PythonWin 
> console and other capabilities from with in a Visual Basic 
> application.
> I am writing an application in which I propose to have a console 
> similar to PythonWin and also be able to run python files etc.
> This might be a "big" question, so I would appreciate any clues or 
> leads in that direction.
> I had looked into some examples given by Mark Hammond in his 
> book "Programming Python" but then I am looking for a more tight 
> integration into the VB application.

You can't really implement the GUI in Python.  You will probably need to 
implement the edit control in VB, hooking the ENTER etc keystrokes.

You then create a sub-class of code.py's main class and make it a COM 
object with the necessary public methods for your VB GUI code to use.

Mark.




More information about the Python-list mailing list