Vivek
Vivek

Reputation: 9

Python custom GUI

I googled and search stackoverflow before asking this question

Answers that I don't expect:

  • wxWidgets is the best Python GUI
  • Use TkInter (BIM) for GUI development.
  • Q. How to make a GUI without using any module/library? i.e make a GUI from scratch. Modules like tkinter not allowed.

    Upvotes: 1

    Views: 2072

    Answers (2)

    Nick Craig-Wood
    Nick Craig-Wood

    Reputation: 54081

    I've made several GUIs from scratch using SDL which is a low level drawing library. The advantage of doing that is that it will look exactly the same on any platform down to the pixel and you can get it to work on embedded systems. Full screen GUIs are really easy too. Disadvantages are that it is a lot of work.

    In python the pygame library wraps SDL so you would use that, and in fact that is how I made the GUI for a lab instrument which had a large colour LCD screen. The controller ran linux, but not X-windows.

    pygame is an extra library, yes, but I can't think of a way of making a GUI with only what python provides.

    Upvotes: 3

    Eli Bendersky
    Eli Bendersky

    Reputation: 273366

    The easiest GUI to make without "module/library" is a web-based one. I.e. generate HTML with Javascript from your Python code, and let the Javascript interact via AJAX with your Python app. This can be implemented without too much effort with just the standard Python library (and some JS code, of course), or with modules that don't require "heavy" installation of platform-specific extensions.

    Upvotes: 1

    Related Questions