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

Discussion in 'Python' started by pauladospublicidad, Jul 11, 2008.

  1. 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!!!!!
    pauladospublicidad, Jul 11, 2008
    #1
    1. Advertising

  2. pauladospublicidad schrieb:
    > 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
    Diez B. Roggisch, Jul 11, 2008
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Benson
    Replies:
    1
    Views:
    1,142
    klappnase
    Dec 9, 2003
  2. vbgunz
    Replies:
    8
    Views:
    1,691
    vbgunz
    May 27, 2006
  3. Chris Angelico
    Replies:
    1
    Views:
    192
    Wolfgang Keller
    Jun 14, 2012
  4. Dietmar Schwertberger
    Replies:
    5
    Views:
    290
  5. Dietmar Schwertberger
    Replies:
    5
    Views:
    321
Loading...

Share This Page