Open littlewhitecloud opened 1 year ago
I'll work on it sometime tomorrow, please don't touch it in the meantime so I can figure out how to do some of these :).
I'll work on it sometime tomorrow, please don't touch it in the meantime so I can figure out how to do some of these :).
LOL during this period, I will work on my new project: TranslucentTB (Yes a python version TranslucentTB) https://github.com/littlewhitecloud/TranslucentTB/
LOL, its almost a week, do you find out something wrong? @Moosems
LOL, my life has been so freaking crazy š¤£. I had so many plans for this summer and a grand total of 0 are completed.
@Moosems Will you still work on the pull request?
Traceback (most recent call last):
File "/Users/Moosems/Desktop/TkTerminal/test.py", line 1, in <module>
from tktermwidget import Terminal
File "/Users/Moosems/Desktop/TkTerminal/tktermwidget/__init__.py", line 7, in <module>
from .style import * # noqa: F401, F403
^^^^^^^^^^^^^^^^^^^^
File "/Users/Moosems/Desktop/TkTerminal/tktermwidget/style.py", line 271, in <module>
CUSTOM: dict[str] = load_style()
^^^^^^^^^^^^
File "/Users/Moosems/Desktop/TkTerminal/tktermwidget/style.py", line 72, in load_style
with open(JSON_FILE, "r", encoding="utf-8") as f:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/Moosems/Library/Caches/tktermwidget/styles.json'
Traceback (most recent call last): File "/Users/Moosems/Desktop/TkTerminal/test.py", line 1, in <module> from tktermwidget import Terminal File "/Users/Moosems/Desktop/TkTerminal/tktermwidget/__init__.py", line 7, in <module> from .style import * # noqa: F401, F403 ^^^^^^^^^^^^^^^^^^^^ File "/Users/Moosems/Desktop/TkTerminal/tktermwidget/style.py", line 271, in <module> CUSTOM: dict[str] = load_style() ^^^^^^^^^^^^ File "/Users/Moosems/Desktop/TkTerminal/tktermwidget/style.py", line 72, in load_style with open(JSON_FILE, "r", encoding="utf-8") as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/Users/Moosems/Library/Caches/tktermwidget/styles.json'
Sorry. I forget isort will move them in front of the checks.
@Moosems Could you try to fix #43? I still donāt know how to fix.
I'll give it a shot sometime soon.
I'll give it a shot sometime soon.
Okay
After I test #22, it doesn't freeze after input a bunch. (On Windows)
result
args
https://github.com/littlewhitecloud/TkTerminal/issues/22#issuecomment-1603696271
Or can you ask someone who you know to test it on another platform? @Moosems
LOL, @Moosems are you still on the car?
Been traveling all month :). Two more weeks.
Been traveling all month :). Two more weeks.
Sounds great!
How's that other project of yours going?
How's that other project of yours going?
Which project? āCustomTkinterTitlebarā or āTranslucenttbā?
The newest one :).
The newest one :).
@Moosems You mean Translucenttb
? Oh, I think it is almost finished. But still has some issues to fix.
I also make something fun based on it:
https://github.com/littlewhitecloud/TkTerminal/assets/71159641/578f0b38-2a2e-400c-bb69-1df19e22f544
(LOL, just for fun)
@Moosems I find out that why the program freeze. Maybe we can use threading (I am not good at it lol, but I will try to learn it)~
Use an event_generate for "threads" as tkinter isn't thread safe.
Use an event_generate for "threads" as tkinter isn't thread safe.
Can you give an example to show how to use event_generate()
?
It seems that tkinter is thread safe now...? (In the new version) I also find a closed issues talks about tkinter thread safe: https://github.com/python/cpython/issues/55286
Can you give an example to show how to use
event_generate()
?
from tkinter import Tk, Button
root = Tk()
def threaded(_) -> None:
print("Running in tandem with the main process")
root.bind("<<Thread>>", threaded)
Button(root, text="Thread", command=lambda: root.event_generate("<<Thread>>"))
root.mainloop()
It seems that tkinter is thread safe now...? (In the new version)
I also find a closed issues talks about tkinter thread safe:
Read through it, it's not ;).
"all Tkinter access must be from the main thread (or more precisely, from the thread that calls the mainloop). Violating this is likely to cause nasty and mysterious symptoms such as freezes and core dumps."
Biscuit does it anyway though :).
I actually looked at this document as well, and I was thinking what is superfluous with ours
I might just "copy" parts ;).
Bruh, It seems that I almost forget there is a pr.
@Moosems This pr is yours now~ I am buckle up :D choose some issues you'd like to fix. (Maybe I will also fix some)
Todo list:
fix #43 fix #35 fix #36 fix #19 fix #27 fix #48 fix #49
Improve
Bugfix
Test