Question about: GUI Builder for Tkinter and call to C/C++ code

P

pauladospublicidad

First I'll introduce myself. I normally programm in C/C++ and Java.
Sometimes I have to mix them (normally using C/C++ in java, because in
java is easier to make portable graphic user interfaces). However to
use C/C++ code in java is really complex and difficult.

Not too much time ago, I discover python. I had think to use it for
developing portable graphic user intefaces, that will call my C/C++
code / libraries / programs.

I had thought to use tkinter for making the GUIs, for portability and
for not installing anything more than python. It's to say, for not
adding more packages because I'm new in python and I don't now too
much about install new packages.

I have seen that for wxpython there is gui builders (such as boa) but
for tkinter I have not found anyon. I would like to know if anyone
knows a GUI Builder for tkinter in order to develop my GUI's
graphically and in a easier way.

Apart from this, I would like to call my C/C++ code / modulles /
applications from python. I have read that python is implemented
normally in C, so is easy to add new modules from C. I would like to
find any tutorial / manual / link for dummies in order to make this
(call my C code from python).

Another solution could be to call the GUI made in python from C/C++
code, but I'm sure this would be more complex.

To sum up, if anyone knows something about this subjects, about what I
would like to do, I'll appreciate any answer :D


Byee!!!!!
 
D

Diez B. Roggisch

pauladospublicidad said:
First I'll introduce myself. I normally programm in C/C++ and Java.
Sometimes I have to mix them (normally using C/C++ in java, because in
java is easier to make portable graphic user interfaces). However to
use C/C++ code in java is really complex and difficult.

Not too much time ago, I discover python. I had think to use it for
developing portable graphic user intefaces, that will call my C/C++
code / libraries / programs.

I had thought to use tkinter for making the GUIs, for portability and
for not installing anything more than python. It's to say, for not
adding more packages because I'm new in python and I don't now too
much about install new packages.

I have seen that for wxpython there is gui builders (such as boa) but
for tkinter I have not found anyon. I would like to know if anyone
knows a GUI Builder for tkinter in order to develop my GUI's
graphically and in a easier way.

AFAIK there is none, at least not usable with python. However, back when
I did tk, I found it easy and clear enough (especially with the powerful
layout managemnt) to hand-craft the GUI.
Apart from this, I would like to call my C/C++ code / modulles /
applications from python. I have read that python is implemented
normally in C, so is easy to add new modules from C. I would like to
find any tutorial / manual / link for dummies in order to make this
(call my C code from python).

There are various options, depending on if you are real about using C,
or if you are more into C++.

If you *can*, you should IMHO rely on a C-API (potentially layering a
C++-lib). Then you can use the since python2.5 build-in ctypes-module to
access any DLL/shared library you like.

For extending and embedding, see the official docs:

http://docs.python.org/ext/ext.html

For C++ wrappers, there are several available:

- SWIG
- Boost::python
- SIP (used to wrap the great Qt gui toolkit)

I can personally recommend the latter, others MMV.
Another solution could be to call the GUI made in python from C/C++
code, but I'm sure this would be more complex.

You don't want this, no. It's possible, but needlessly complex.

HTH,

Diez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top