|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VB6 frontend GUI with Pythonwindow that allows Python commands to be typed at the prompt. The idea is so that, I can have full Python scripting from within my application. I should be able to type commands from a Python script (include import etc, so I can use other Python libraries). In other words, I want to provide a complete (or almost complete) interactive Python Scripting environment from within my application - so that I enter commands in the VB6 console, and I get the (text) results displayed in my VB6 console, and in the case of a graphic output (let say I am importing wxPython for graphing functionality), I would have the graph display after I have typed my command in my VB6 console. My initial route was to try to embed the Python interpreter, using BOOST Python, writing a Win32 DLL around that and then calling the functions from VB6. But I had various problems with that approach - so I am now looking to use a Python COM server approach (although I would have preferred not to touch COM). I have done a lot of Googling and research online - but I can't find anything remotely useful, that shows me how to do what I want to do. If anyone has done something similar to what I am trying to do, or knows of any links that may show me how to do provide a VB6 frontend GUI (i.e. console) for use with Python, I will be very grateful.
Show quote
"Claire Blair" <no.re***@here.com> wrote in message Try Karl's Console App:news:H6KdnbBt6OClCN_anZ2dnUVZ8tvinZ2d@bt.com... > I am trying to write a VB6 (not VB.Net) application that has a console > window that allows Python commands to be typed at the prompt. > > The idea is so that, I can have full Python scripting from within my > application. I should be able to type commands from a Python script > (include import etc, so I can use other Python libraries). In other > words, I want to provide a complete (or almost complete) interactive > Python Scripting environment from within my application - so that I > enter commands in the VB6 console, and I get the (text) results > displayed in my VB6 console, and in the case of a graphic output (let > say I am importing wxPython for graphing functionality), I would have > the graph display after I have typed my command in my VB6 console. > > My initial route was to try to embed the Python interpreter, using BOOST > Python, writing a Win32 DLL around that and then calling the functions > from VB6. But I had various problems with that approach - so I am now > looking to use a Python COM server approach (although I would have > preferred not to touch COM). > > I have done a lot of Googling and research online - but I can't find > anything remotely useful, that shows me how to do what I want to do. If > anyone has done something similar to what I am trying to do, or knows of > any links that may show me how to do provide a VB6 frontend GUI (i.e. > console) for use with Python, I will be very grateful. http://vb.mvps.org/samples/project.asp?id=console I think what you want is the IActiveScript interface,
but I don't know whether there's any sample code written for VB6. Show quote > I am trying to write a VB6 (not VB.Net) application that has a console > window that allows Python commands to be typed at the prompt. > > The idea is so that, I can have full Python scripting from within my > application. I should be able to type commands from a Python script > (include import etc, so I can use other Python libraries). In other > words, I want to provide a complete (or almost complete) interactive > Python Scripting environment from within my application - so that I > enter commands in the VB6 console, and I get the (text) results > displayed in my VB6 console, and in the case of a graphic output (let > say I am importing wxPython for graphing functionality), I would have > the graph display after I have typed my command in my VB6 console. > > My initial route was to try to embed the Python interpreter, using BOOST > Python, writing a Win32 DLL around that and then calling the functions > from VB6. But I had various problems with that approach - so I am now > looking to use a Python COM server approach (although I would have > preferred not to touch COM). > > I have done a lot of Googling and research online - but I can't find > anything remotely useful, that shows me how to do what I want to do. If > anyone has done something similar to what I am trying to do, or knows of > any links that may show me how to do provide a VB6 frontend GUI (i.e. > console) for use with Python, I will be very grateful. |
|||||||||||||||||||||||