#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    19
    Rep Power
    0

    API-specifc Tkinter 8.5 features


    I browsed through some Tkinter documentation, and 80% of it is devoted to customizing basic Tkinter code to make Windows API calls. If I want to use Tkinter on Linux, I need to learn only 20% of it. But the question is whether an application written in a generic version of Tkinter, which does not make use of the Windows API calls, would run in a satisfactory way on Windows. Is it possible to use Tkinter to write something cross-platform that doesn't need to be ported in order to run on various OSs? Or is it just better to use Gtk3 as available for Python 3.x in Linux and then add a Windows installer that automatically downloads and installs the Gtk3 libraries?
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,894
    Rep Power
    481
    I've never seen a tkinter book or reference devoted to windows. i use http://effbot.org/tkinterbook/ or in hardcover,
    Python and Tkinter Programming by Grayson, and another dude who regularly answers questions on this forum has perhaps even a better reference.
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    153
    Rep Power
    5
    I've often written tkinter apps on Linux for distribution on Windows; I'm not sure what Windows-specific things you've been told you have to do to make it all work, it generally just works for me. If you just use the ttk widgets it even kinda-sorta looks nativish.

    That said, if you want a really nice looking cross-platform widget library, I'd go with Qt.

    EDIT: I'll add tkdocs.com to the documentation recommendations.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Posts
    19
    Rep Power
    0
    I was referring to the only beginner Tkinter tutorial I was able to find: http://effbot.org/tkinterbook/. Thumb through it and you'll see that 80% of it is Windows API calls.

    Since then I've had a peek at the New Mexico reference at http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html, which is at least more recent than Methuselah's birthday.

    I am trying to avoid reference books aimed at working programmers who have already been writing code in C for 20 years, which is to say nearly all of them. I'm a beginner whose first-ever computer language is Python and need to have things explained to me that reference books tend to assume I must already know.

IMN logo majestic logo threadwatch logo seochat tools logo