Skip to content

Commit

Permalink
Fixes for python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisMcGowanAu committed Aug 25, 2024
1 parent 946e9d2 commit e4b601e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 deletions.
12 changes: 10 additions & 2 deletions install.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
##############################
# On Linux Debian
# On Linux Debian bookworm based distros -- Ubuntu 24.04, Mint 22 etc
##############################
sudo apt install python3-full
# This next step is necessary on debian 12
# This next step is necessary on debian 12 (bookworm)
# No idea why they changed the way this worked ...sigh...
sudo mv /usr/lib/python3.11/EXTERNALLY-MANAGED /usr/lib/python3.11/EXTERNALLY-MANAGED.old
or/and
sudo mv /usr/lib/python3.12/EXTERNALLY-MANAGED /usr/lib/python3.12/EXTERNALLY-MANAGED.old

pip install --user tkfontchooser
pip install --user coloredlogs
pip install --user ttkbootstrap
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow


##############################
Expand All @@ -18,6 +24,8 @@ sudo apt install python3-full
pip install tkfontchooser
pip install coloredlogs
pip install ttkbootstrap
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow


For other Linux releases, use you local package manager in a similiar way, install the latest python3 and using pip ( pr pip3 ) install tkfontchooser, coloredlogs and ttkbootstrap
Expand Down
24 changes: 15 additions & 9 deletions pytkquickgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,23 +813,29 @@ def chooseBackground():
myVars.backgroundColor = colors[1]
def welcome():
about = '''PyTkGui:
Chris McGowan 2024.
A tool to build a simple TkInter GUI.
Chris McGowan 2024.
A tool to build a simple TkInter GUI.
This tool uses ttkbootstrap widgets.
A website - youtube - pdf TBD.'''

# remove leading whitespace from each line
about2 = re.sub("\n\s*", "\n", about)
# this does not work on python 3.12
# about2 = re.sub("\n\s*", "\n", about)
about2 = about
Messagebox.show_info(message=about2,title="Welcome")

def helpMe():
about = '''Basic Actions:
Right click on the background to get a list of Widgets.
A selected Widget will place itself where the mouse is.
Left click hold and drag to move Widgets around.
Left click and drag close to the inside edge of Widgets to resize.
Right Click on Widgets to choose Edit and Layout windows.'''
Right click on the background to get a list of Widgets.
A selected Widget will place itself where the mouse is.
Left click hold and drag to move Widgets around.
Left click and drag close to the inside edge of Widgets to resize.
Right Click on Widgets to choose Edit and Layout windows.'''

# remove leading whitespace from each line
about2 = re.sub("\n\s*", "\n", about)
# this does not work on python 3.12
# about2 = re.sub("\n\s*", "\n", about)
about2 = about
Messagebox.show_info(message=about2,title="Help")

def buildMenu():
Expand Down

0 comments on commit e4b601e

Please sign in to comment.