-7

I need to make a Python embedded C++ program that can open programs, like Skype and Firefox. It will have to be compiled into an executable, or have a batch file run it. (It is for Windows 7 x64 bit).

I know there are tutorials out there, but none of them give any insight into how to do OS operations. Please no boost libraries if at all possible, the documentation for those is really confusing to me.

If there are any examples, tutorials, templates, or anything else besides the boost libraries that would be a huge. Python 3 or Python 2.7 is good, it doesn't matter either way.

Or if anyone has any tips, or any help at all would be much appreciated.

Edit::

Sometimes I don't even know why I bother asking for help on this site when this is the quality of responses I get to a question like this.

Tropical_Peach
  • 1,143
  • 3
  • 16
  • 29
  • 2
    What's wrong with using the Python process functionality? – Mats Petersson Aug 04 '13 at 06:31
  • 2
    Why do you need to make this? You offer no rationale. It seems you want write a C++ program and embed Python in it, or the other way around (that's unclear) so you can run Skype. That makes no sense as both Python and C++ can run external processes by themselves. – Lennart Regebro Aug 04 '13 at 06:32
  • It's a program I have to write for a class I'm taking. It just needs to be a C++ program that has embedded python in it. I wanted to make one to replace the Python program I made recently that I use to open all the program I need instead of having them start all at the Windows bootup time. – Tropical_Peach Aug 04 '13 at 07:51

1 Answers1

3

Firstly, if you plan to embed python into a C++ program only because you want to launch other programs, then you are swatting a fly using a sledgehammer.

Use the subprocess and os modules in Python to perform your task using core python itself.

However, if your embedded python module is a part of a larger application being developed in C++, then refer to Extending and Embedding Python interpretor for more information oh now to do this task.

Prahalad Deshpande
  • 4,709
  • 1
  • 20
  • 22
  • Thanks, I've already looked through that though, and it isn't really clear on how to use the subprocess-type commands in the embedded program. Also, that's what I have now, but as a project for a class I'm taking, I need to embed what I have in the python program I have into a C++ file. – Tropical_Peach Aug 04 '13 at 07:53