473,507 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

can python be a "shell" of c++ program?

Hi all

I have some data to process, whith complex mechanism,I put these process
mechanism as plugins.
and design lots of classes to abstract data themselves.

but the question is how to drive them work together.

That cause too much jobs: I should write UI,parser......almost a completed
system.

The problem is I don't know what these processed data will finally needed to
display to user.
maybe this , may be that, these can not know on design time.

what I need is on outside of program,
I can use some interface to get these data what I want , or push back data,
or told program to recalculate it.
can I have a way to drive c++ code use this script-like way ?
thank you very much

key9


Jun 3 '06 #1
1 1595
Yes you can, although it might be a fair bit of work depending on the
complexity of your codebase. Basically you would need to write Python
extensions to expose your C++ classes as Python modules, using SWIG or
the Python extension code in the Boost C++ libraries. You'd then embed
an interpreter in your program which would allow you to use Python
code within it - either from a script or individual commands.

It's a fairly common use of Python :)

James

On 03/06/06, key9 <ia*****@126.com> wrote:
Hi all

I have some data to process, whith complex mechanism,I put these process
mechanism as plugins.
and design lots of classes to abstract data themselves.

but the question is how to drive them work together.

That cause too much jobs: I should write UI,parser......almost a completed
system.

The problem is I don't know what these processed data will finally needed to
display to user.
maybe this , may be that, these can not know on design time.

what I need is on outside of program,
I can use some interface to get these data what I want , or push back data,
or told program to recalculate it.
can I have a way to drive c++ code use this script-like way ?
thank you very much

Jun 3 '06 #2

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

Similar topics

1
1693
by: Uwe Mayer | last post by:
Hi, in an application I want to provide direct access to the python interpreter of the running program. I use rawinput() and exec() to read an input string and a self-made function to check...
3
2829
by: MLH | last post by:
Where would I go to find a list of the possible return values for X and their implication when launching.. X=Shell("C:\Windows\wordpad.exe c:\cr\docs\packets\ntrolttr.rtf", 1) ???
2
2235
by: Jay | last post by:
Is their any way of setting wear the Python Shell window appears on the screen when I run my program? I am testing a full screen program with no Window Frame on a comp with 2 monitors and I have...
1
1829
by: Stinky Pete | last post by:
Hi, With thanx to the group and suggestions to review other news sites, I've got some code that allows me to open Adobe from Access. As I am new at this, I still need some help though. The...
4
11988
by: uinoma | last post by:
I want to open notepad in fullscreen mode, but this script that I created can't do that. . When I open Windows Manager Task, the program is just run in background, not appeared on web server...
12
2451
by: Krypto | last post by:
I have been using python shell to test small parts of the big program. What other ways can I use the shell effectively. My mentor told me that you can virtually do anything from testing your...
3
2899
by: koutoo | last post by:
Is it possible to display messages in the python shell? I want to display error messages based on parameters in my scripts to the users. Is there another way to display messages other than log...
7
3956
by: Alex K | last post by:
Hello, Does anyone know if the python shell supports paging or if I should look into iPython? Thank you so much. Alex
15
2148
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
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7114
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1544
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.