slightlynybbled / tk_tools

Python tkinter tools, Python3.7+
MIT License
101 stars 25 forks source link

Use image_strings to store the images #13

Closed slightlynybbled closed 6 years ago

slightlynybbled commented 6 years ago

see pull request: https://github.com/slightlynybbled/tk_tools/pull/11

slightlynybbled commented 6 years ago

Fixed - images are now stored as image strings within the package, accessible as package data. For instance, the former tk_tools/images/rotary_scale.png is now accessible as python string data:

former:

import tkinter as tk

image = tk.PhotoImage(file='tk_tools/images/rotary_scale.png')

current:

import tkinter as tk
from tk_tools.images import rotary_scale

image = tk.PhotoImage(data=rotary_scale)