Embedd Python into C++ to perform OS operations [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
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.

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.

Related

How to use Ruby in C/C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have some experience in C/C++ but I am new to Ruby. So today I got a task from my teacher to use some other languages to create a shared library (in my case, .so) that I will use in my C++ program. I wanted to try Ruby for a long time, but now when I compiled, installed and played with it a bit, I have no idea what's next.
I googled alot, but all I can find (SWIG, Rice) is related to using C/C++ in Ruby, not Ruby in C/C++. Is it possible? Am I wrong with SWIG and Rice and I actually CAN use them vice-versa (ruby for c, c for ruby)? If it is so, can you please attach any guides about that?
Ruby is an interpreted language, and I've never seen it compiled. What I know is that you can drop into C/C++ from within ruby. It's unclear what you're trying to accomplish. You might be looking for something that doesn't exist or make sense?
In Ruby, libraries are called gems, which are a collection of classes modules and other related files.
If you're looking for information about similarities between ruby and C/C++ this might be a good starting place. https://www.ruby-lang.org/en/documentation/ruby-from-other-languages/to-ruby-from-c-and-cpp/
Other than that, please do some more research and refine your question.

What do I need to know to create Linux GUI elemnts [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm looking to start developing Linux, specifically graphical elements and visuals. For example, the gnome-panel. I would be developing graphical interfaces like that. So the question is, what do I need to know? What resources do I need? I've looked all around for resources and I've discovered qt (of course) FVWM, and looked through an archived version of lynucs.org. So, what should I begin with? I haven't found a single tutorial on creating graphical elements for linux, so hopefully someone here can help me.
Thanks.
In Qt you have a very good documentation. You can start with some easy tutorials and than work on with more advanced concepts.
Here is a good starting point: http://qt-project.org/doc/qt-5.1/qtdoc/gettingstarted.html
If you are looking to develop desktop components that integrate with Linux desktops, then the answer is not straightforward. Depending on the desktop environment you develop for, you have to use different libraries.
If it is for Gnome, then definitely look into GTK+, or more recently Javascript.
If it is for KDE, then you should use Qt, as KDE is written entirely in Qt.
For working on gnome-panel (or some other GNOME component), you could look into GTK+.

Integrating Latex into my desktop application [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I'm searching for a consultation, or maybe an opinion, a suggestion, or something like this.
I'm starting a project (desktop application) that is something like an IDE for writing books/reports. I'm planing to introduce LaTeX features, if I can name them in a such way.
So the question is: Is it possible to integrate a LaTeX script or plug-in in my software in order to have the needed features?
Waiting for questions or suggestions on my topic.
Thanks in advance!
P.S. Sorry if this topic was already posted.
Not sure I understand your question correctly. I never heard of some kind of LaTeX library or plugin of some kind, which is readily available to be integrated in other programs.
You tagged your question 'qt' so I assume, you use Qt as your framework. The only way I see to integrate LaTeX into Qt is using QProcess. Write your LaTeX code, start pdflatex with QProcess. The question then is if you can do something with the created pdf file.
Look for MikTeX and TeXworks. If you google those, you should be able to get the links to download those. That should do what you need.

Idea's for making a workbench type interface [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm looking at MeVisLab's interface for generating views of data and I find that that way of viewing control structures is extremely intuitive.
It is especially the connected boxes I'm liking, is there any kind of framework that supplies this sort of interface. I know it can be done using Qt but beleave it takes ALOT of work.
Does anyone know of frameworks for making this type of gui?
This is not c++, but i think it covers your problem, so i would suggest WireIt.
Examples:
http://neyric.github.com/wireit/plugins/editor/examples/logicGates/index.html
http://neyric.github.com/wireit/plugins/composable/examples/jsBox/jsBox.html
It is a Java Script library, so the browser would be your GUI. But i really think, that using the browser is a good thing to do. Learning HTML, CSS and Java Script is about as difficult as learning a new GUI framework. You could concentrate on HTML5 and ignore old browsers and maybe use a nice lib like jQuery, which is like the boost of js. Even if your GUI would only work on Firefox you would still support more platforms than most GUI-Toolkits.
You would of course have to embed a small http-server in your c++ code, you could use libmicrohttpd or mongoose for that.
In the end you have used tools that are very reusable and will have a broader applicability than GUI Frameworks.

Better logging library for C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
In our project now we using log4cxx, but those library don't develope some years, also we have some problems with it.
Could you advise some library for logging in C++.
Library must support multithreade logging, system-log.
Also it'll be good if it support logging via << operator.
Also lib license must be very democracy - like boost, apache etc
Crossplatform support. Must support linux, windows. Better if it support solaris, aix, hp-ux, but it's not necessary.
boost::log is probably the most versatile and well-written logging library I've seen. It's pretty complicated but really genius at the same time. And it does everything you can think of and then some more.
I use the glog library, by google (because I could not install Boost.Log easily). It is both simple to use and powerfull.
We use log4cplus in our company, it provides a complex hierarchical logging system (based on log4j). It seems to have everything you are asking for. It provides many appenders (I personally choose this library for the rolling files linux/windows and linux Syslog).
The library is quite simple to compile and deploy on both linux & windows And do the job no problem so far (about 4 years in production).
Only drawback, the lack of documentation but the code it quite self-explanatory. Good new is you could go to the log4j documentation page to understand how configurators/patterns/etc works ...
Check out pantheios!