472,960 Members | 1,880 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,960 software developers and data experts.

interfacing Python interpreter with a VB6 frontend

I am trying something which appears (so far), that many other people
have not yet tried before - since I can't find any useful related
material despite several days of searching various sites/blogs etc.

I want to use VB6 as a front end for building a small GUI console that
accepts python commands at the command line and executes them, returning
any results to the VB6 window.

This requires several steps, but the one I am having most problem
finding info on is the ff:

1. using/interacting the Python interpreter from VB6

Any pointers/demos etc are very welcome - and if this has already been
done, please let me know, so I can learn from what someone else has done
Oct 3 '07 #1
5 1448
On Behalf Of Anonymous
This requires several steps, but the one I am having most
problem finding info on is the ff:

1. using/interacting the Python interpreter from VB6
One way to do this might be by creating a COM server with Python, and having
VB feed it lines of text and then collect results of execution for display.

win32com has demos of COM servers.

--
Regards,
Ryan Ginstrom

Oct 3 '07 #2


Ryan Ginstrom wrote:
>>On Behalf Of Anonymous
This requires several steps, but the one I am having most
problem finding info on is the ff:

1. using/interacting the Python interpreter from VB6


One way to do this might be by creating a COM server with Python, and having
VB feed it lines of text and then collect results of execution for display.

win32com has demos of COM servers.

--
Regards,
Ryan Ginstrom
Hi Ryan, do you have a link to the resources you mentioned?. I did a
search for win32com - and found this :
http://python.net/crew/mhammond/win32/FAQ.html (most of the links were
either dead, or refrerred to using COM from within Python - i.e. the
OTHER way round).
Oct 3 '07 #3
On 3 Oct, 11:07, Anonymous <no.re...@here.comwrote:
I am trying something which appears (so far), that many other people
have not yet tried before - since I can't find any useful related
material despite several days of searching various sites/blogs etc.

I want to use VB6 as a front end for building a small GUI console that
accepts python commands at the command line and executes them, returning
any results to the VB6 window.

This requires several steps, but the one I am having most problem
finding info on is the ff:

1. using/interacting the Python interpreter from VB6

Any pointers/demos etc are very welcome - and if this has already been
done, please let me know, so I can learn from what someone else has done
http://www.oreilly.com/catalog/pytho...pter/ch12.html

Oct 3 '07 #4
En Wed, 03 Oct 2007 07:53:15 -0300, Anonymous <no******@here.comescribi�:
Ryan Ginstrom wrote:
>One way to do this might be by creating a COM server with Python, and
having
VB feed it lines of text and then collect results of execution for
display.
win32com has demos of COM servers.

Hi Ryan, do you have a link to the resources you mentioned?. I did a
search for win32com - and found this :
http://python.net/crew/mhammond/win32/FAQ.html (most of the links were
either dead, or refrerred to using COM from within Python - i.e. the
OTHER way round).
win32com is part of the Python for Windows extensions by Mark Hammond:
https://sourceforge.net/projects/pywin32/

--
Gabriel Genellina

Oct 3 '07 #5
Anonymous wrote:
>
Ryan Ginstrom wrote:
>>On Behalf Of Anonymous
This requires several steps, but the one I am having most
problem finding info on is the ff:

1. using/interacting the Python interpreter from VB6

One way to do this might be by creating a COM server with Python, and having
VB feed it lines of text and then collect results of execution for display.

win32com has demos of COM servers.

--
Regards,
Ryan Ginstrom

Hi Ryan, do you have a link to the resources you mentioned?. I did a
search for win32com - and found this :
http://python.net/crew/mhammond/win32/FAQ.html (most of the links were
either dead, or refrerred to using COM from within Python - i.e. the
OTHER way round).
You might also want to pick up a copy of Hammond and Robinson's
"Programming Win32 in Python", which discusses various ways of
front-ending Python programs with VB interfaces.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden

Sorry, the dog ate my .sigline

Oct 3 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Bram Stolk | last post by:
pyHello, Google helped me find a nice package to interface python with MS Excel. "win32all", or sometimes called by the name "pywin32". http://starship.python.net/crew/mhammond/ However,...
1
by: benevilent | last post by:
Hey, I am embedding Python in an application, and have an efficency concern about this. There is a Python method which is called from the main application (written in C) many times per second (I...
0
by: Fuzzyman | last post by:
Movable Python has just been released on sourceforge. Movable Python is a frozen distribution of Python. It will run python scripts without needing to be installed. ...
5
by: John Hunter | last post by:
I have a question about what it takes to trigger GPL restrictions in python code which conditionally uses a GPL library. Here is the context of my question. matplotlib, which I develop, is a...
28
by: H J van Rooyen | last post by:
Hi, I want to write a small system that is transaction based. I want to split the GUI front end data entry away from the file handling and record keeping. Now it seems almost trivially easy...
4
by: Claire Blair | last post by:
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. The idea is so that, I can have full Python scripting from...
3
by: spectrumdt | last post by:
Hello. I am running Fedora Linux and KDE, using the Konsole command line. When coding Python, I regularly make a bug causing my program to not terminate. But how do I kill the non-terminating...
15
by: lixinyi.23 | last post by:
Hi! I'm currently working on a scientific computation software built in python. What I want to implement is a Matlab style command window <-> workspace interaction. For example, you type...
0
by: Fredrik Lundh | last post by:
joey boggs wrote: wouldn't it be easier to use a good old Unix shell for this? or just a stock Python with some boilerplate code? drop("/stuff") drop("/otherstuff") </F>
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.