Skip to Content
Tkinter GUI Programming by Example
book

Tkinter GUI Programming by Example

by David Love
April 2018
Beginner content levelBeginner
340 pages
7h 54m
English
Packt Publishing
Content preview from Tkinter GUI Programming by Example

macOS

When packaging for macOS, cx_freeze may work for you. However, there is another alternative named py2app, which we will take a look at now.

Ensure you have the tkedit.py file described in the Windows section earlier, then install py2app into our virtual environment using pip. We will need version 0.13, since later versions do not support Tkinter properly:

$ source env/bin/activate$ pip install py2app==0.13

With py2app installed, you can go ahead and let it generate a setup.py file using its setup tools:

$ py2applet --make-setup tkedit.py

This should overwrite your setup.py file with a new one. We will need to add our PyYAML dependency to it, so it looks like so:

"""This is a setup.py script generated by py2appletUsage: python setup.py ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Tkinter GUI Application Development Blueprints, Second Edition - Second Edition

Tkinter GUI Application Development Blueprints, Second Edition - Second Edition

Bhaskar Chaudhary

Publisher Resources

ISBN: 9781788627481Supplemental Content