Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RotaryScale constructor changes + new imgs #11

Merged
merged 1 commit into from
Oct 18, 2017
Merged

RotaryScale constructor changes + new imgs #11

merged 1 commit into from
Oct 18, 2017

Conversation

AokiAhishatsu
Copy link
Contributor

  • Added RotaryScale options
  • Added volt and bar background images for RotaryScale

- Added volt and bar background images for RotaryScale
@AokiAhishatsu AokiAhishatsu changed the title RotaryScale constructor changes RotaryScale constructor changes + new imgs Oct 18, 2017
@slightlynybbled
Copy link
Owner

slightlynybbled commented Oct 18, 2017

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
Copy link
Contributor Author

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

@AokiAhishatsu
Copy link
Contributor Author

AokiAhishatsu commented Oct 18, 2017

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
Copy link
Owner

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

@AokiAhishatsu
Copy link
Contributor Author

AokiAhishatsu commented Oct 18, 2017

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
Copy link
Owner

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
Copy link
Contributor Author

I don't care about the u

@slightlynybbled slightlynybbled merged commit 465d5df into slightlynybbled:master Oct 18, 2017
slightlynybbled added a commit that referenced this pull request Oct 24, 2017
RotaryScale constructor changes + new imgs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants