Tkinter (GUI Programming) Tkinter is a graphical user interface (GUI) module for Python, you can make desktop apps with Python. You can make windows, buttons, show text and images amongst other things. Tk and Tkinter apps can run on most Unix platforms. This also works on Windows and Mac OS X. The module Tkinter is an interface to the Tk GUI. In this step-by-step tutorial, you'll learn how to create a cross-platform graphical user interface (GUI) using Python and the wxPython toolkit. A graphical user interface is an application that has buttons, windows, and lots of other widgets that the user can use to interact with your application. In this tutorial we’ll be using py2app to create a standalone OSX application from a Python 2 or 3 source code with a simple Tkinter user interface. 'py2app is a Python setuptools command which will allow you to make standalone application bundles and plugins from Python scripts. Py2app is similar in purpose and design to py2exe for Windows.' Relevant links about py2app: Documentation Source. GUI SDK Launched in 2018. It's 2020 and PySimpleGUI is actively developed and supported. Super-simple to create custom GUI's. 200+ Demo programs & Cookbook for rapid start. Extensive documentation. Main doc is www.PySimpleGUI.org. Examples using Machine Learning(GUI, OpenCV Integration, Chatterbot), Rainmeter Style Floating Desktop Widgets, Matplotlib + Pyplot integration, add GUI to command.
In this tutorial we’ll be using py2app to create a standalone OSX application from a Python 2 or 3 source code with asimple Tkinter user interface.
'py2app is a Python setuptools command which will allow you to make standalone application bundles and plugins from Python scripts. py2app is similar in purpose and design to py2exe for Windows.'
Relevant links about py2app:
This guide is loosely based on the official tutorial.Based on a Python file called
Sandwich.py , we’ll create an application called Sandwich.app .
Prerequisites
Create a custom directory and create a virtualenv:
Now create a very simple Tkinter app with the filename
Sandwich.py :
This little app will look like this:
Install py2app
The original version of py2app has a bug due to a newer version of ModuleGraph. Imade a fork of the project and fixed this bug on Github.Install it with pip like this:
Create a
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |