posita / dyce

Simple Python tools for exploring dice outcomes and other finite discrete probabilities
https://posita.github.io/dyce/
Other
33 stars 2 forks source link

Sostitution of os.get_terminal_size() with shutil.get_terminal_size() in h.py @ line 105 #5

Closed sudo-simon closed 2 years ago

sudo-simon commented 2 years ago

When trying to execute a program that doesn't use a terminal (.pyw extension) os.get_terminal_size() throws "ValueError: bad file descriptor". Resolved substituting it with shutil.get_terminal_size(), if you want to fix it.

posita commented 2 years ago

Oh! Good cal! I've long debated the utility of that little effort. If you can't run dyce without a terminal, what good it is?! Let's get this fixed.

posita commented 2 years ago

PR is up and a merge and new release should follow shortly.

Oh! I also completely forgot. Congratulations on being dyce's first ever non-owner issue filer! 🎉

Bob, tell @sudo-simon what he's won.

Bob "writes": Thanks, @posita! @sudo-simon ain't no simple pieman. But that's not all. He has gained the eternal gratitude of dyce maintainers now and forevermore!

champagne-happy

posita commented 2 years ago

I just released 0.4.2, which I'm pretty sure should resolve your issue. One note: the PyPI project recently changed from dycelib to dyce, so you might need to update your dependencies. Consider a spec of dyce>=0.4.2 to make sure you include the fix for this issue. (import statements should continue to work, unchanged.)

Please let me know if you have any other difficulty, and thanks so much for reporting this!

sudo-simon commented 2 years ago

Works like a charm! Thank you for this fine library, I will proudly say I have contributed to 1 line of it. Have a nice day!