slightlynybbled / tk_tools

Python tkinter tools, Python3.7+
MIT License
103 stars 24 forks source link

RotaryScale constructor changes + new imgs #11

Closed AokiAhishatsu closed 7 years ago

AokiAhishatsu commented 7 years ago
slightlynybbled commented 7 years ago

Thank you so much! I love it! My only question is that I would like to understand the implication for adding unit=' u'. I believe that this results in outputs that will - by default - say 21.04 u instead of simply 21.04, correct? I didn't see any other changes related to this.

AokiAhishatsu commented 7 years ago

Yes, I my intention was to display a default unit with one space in front.

AokiAhishatsu commented 7 years ago

And btw, I use img_data to read images from base64 strings. This is very useful when you want create single file executables with pyInstaller.

slightlynybbled commented 7 years ago

I was about to merge your pull request, but I am very intrigued by your img_data comment. Could you elaborate?

AokiAhishatsu commented 7 years ago

You can save an image in a string. You can generate the string with this:

import base64

with open("\some\path\and\file.py", "rb") as image_file:
    encoded_string = base64.b64encode(image_file.read())

print(encoded_string)

And call the constructor with the string.

slightlynybbled commented 7 years ago

Would you be opposed to removing the unit = u? In the circles I travel in, this often means micro as in microseconds. Other than that, I'm quite happy. Your pull request will then be merged and released to v0.2.5 on pypi.

I will take the image string advice. I have already had issues with images and pyinstaller, so this will help on multiple fronts. That will probably be the next release up, v0.3.x since it is a bit more comprehensive.

AokiAhishatsu commented 7 years ago

I don't care about the u