Hello,

I am new to the programming game and have a question for you seasoned veterans:

I have a data collection device whose API is c++ based. When I want to write a program whose first step is to initialize the system, I write "InitializeSystem(); " In a C++ IDE (Visual Studio). Anyway...I wrote a data collection program in c++ and it works very well.

What I would like to do is write a tkinter application capable of accessing the same sort of functionality. So imagine for example that I have a tkinter window with one button. When the user presses the button, it is equivalent to making the call to "InitializeSystem(); " in a c++ program. How do I do this? What is the general plan of attack?

Sorry for the rough explanation. I can clarify if needed. Any help is greatly appreciated.

Recommended Answers

All 3 Replies

A simple way to call a c++ api from python is to use swig http://www.swig.org/

I will check it out! Thanks :)

So that seems like a pretty good solution. Thanks for the tip! Marking thread as solved.

Take-home lesson: Swig is neat!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.