Skip to content

Commit 53c43dd

Browse files
committed
- wip (color mixer mac fix)
1 parent 977347e commit 53c43dd

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ py5 is a new version of Processing for Python 3.8+. It makes the Java Processing
104104

105105
## Credits
106106

107-
Thanks [villares](https://github.com/villares/thonny-py5-runner) for inspiring me to develop this plug-in, [hx2A](https://github.com/hx2A/) for the awesome [py5 project](https://py5.ixora.io/), and the [Thonny folks](https://github.com/thonny) for their fantastic IDE.
108-
107+
Thanks [villares](https://github.com/villares/thonny-py5-runner) for inspiring me to develop this plug-in, [hx2A](https://github.com/hx2A/) for the awesome [py5 project](https://py5.ixora.io/), and the [Thonny folks](https://github.com/thonny) for their fantastic IDE. The *Color Selector* incorporates Juliette Monsel's excellent [tkColorPicker](https://github.com/j4321/tkColorPicker) module.
109108

110109

111110
## Todo List

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
install_requires=[
3333
'install-jdk==0.3.0',
3434
'py5==0.8.0a2',
35-
'pyperclip==1.8.2',
36-
'tkcolorpicker==2.1.3'
35+
'pyperclip==1.8.2'
3736
]
3837
)

thonnycontrib/thonny-py5mode/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@
2424
from thonny.languages import tr
2525
from thonny.running import Runner
2626
from thonny.shell import BaseShellText
27-
from tkcolorpicker import askcolor
2827
from tkinter.messagebox import showerror, showinfo
2928
try: # thonny 4 package layout
3029
from thonny import get_sys_path_directory_containg_plugins
3130
except ImportError: # thonny 3 package layout
3231
pass
32+
# modified tkcolorpicker (by j4321) to work with thonny for macos
33+
# https://github.com/tabreturn/thonny-py5mode-tkcolorpicker
34+
# hopefully, pull-request is accepted so this can install via pypi
35+
from .tkcolorpicker import askcolor
3336

3437

3538
_PY5_IMPORTED_MODE = 'run.py5_imported_mode'
@@ -150,7 +153,7 @@ def toggle_py5_imported_mode() -> None:
150153

151154
def color_selector() -> None:
152155
'''open tkinter color selector'''
153-
pyperclip.copy(askcolor(title='Color selector')[1])
156+
pyperclip.copy(str(askcolor(title='Color selector')[1]))
154157

155158

156159
def convert_code(translator) -> None:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.4.5-alpha'
1+
__version__ = '0.4.6-alpha'

0 commit comments

Comments
 (0)