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

Bug fix & Improve #47

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open

Bug fix & Improve #47

wants to merge 34 commits into from

Conversation

@littlewhitecloud littlewhitecloud marked this pull request as ready for review June 30, 2023 09:57
@Moosems
Copy link
Collaborator

Moosems commented Jun 30, 2023

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 :).

@littlewhitecloud
Copy link
Owner Author

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/

@littlewhitecloud
Copy link
Owner Author

LOL, its almost a week, do you find out something wrong? @Moosems

@Moosems
Copy link
Collaborator

Moosems commented Jul 6, 2023

LOL, my life has been so freaking crazy 🤣. I had so many plans for this summer and a grand total of 0 are completed.

@littlewhitecloud littlewhitecloud changed the title Bug fix Bug fix & Improve Jul 8, 2023
Add E402 for `ruff check .` (Really hate it)
@littlewhitecloud
Copy link
Owner Author

@Moosems Could you try to fix #43? I still don’t know how to fix.

@Moosems
Copy link
Collaborator

Moosems commented Jul 17, 2023

I'll give it a shot sometime soon.

@littlewhitecloud
Copy link
Owner Author

I'll give it a shot sometime soon.

Okay

Repository owner deleted a comment from Moosems Jul 17, 2023
@littlewhitecloud
Copy link
Owner Author

littlewhitecloud commented Jul 17, 2023

After I test #22, it doesn't freeze after input a bunch. (On Windows)
result
image
args
image
#22 (comment)
Or can you ask someone who you know to test it on another platform? @Moosems

@littlewhitecloud
Copy link
Owner Author

LOL, @Moosems are you still on the car?

@Moosems
Copy link
Collaborator

Moosems commented Jul 18, 2023

Been traveling all month :). Two more weeks.

@littlewhitecloud
Copy link
Owner Author

Been traveling all month :). Two more weeks.

Sounds great!

@Moosems
Copy link
Collaborator

Moosems commented Jul 18, 2023

How's that other project of yours going?

@littlewhitecloud
Copy link
Owner Author

How's that other project of yours going?

Which project? “CustomTkinterTitlebar” or “Translucenttb”?

@Moosems
Copy link
Collaborator

Moosems commented Jul 18, 2023

The newest one :).

@littlewhitecloud
Copy link
Owner Author

littlewhitecloud commented Jul 19, 2023

The newest one :).

@Moosems You mean Translucenttb? Oh, I think it is almost finished. But still has some issues to fix.
image
image
image
image
I also make something fun based on it:

250234306-a2d0b4cc-0698-46c0-b050-e3d89c788964.mp4

(LOL, just for fun)

@littlewhitecloud
Copy link
Owner Author

littlewhitecloud commented Jul 20, 2023

@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)~

@Moosems
Copy link
Collaborator

Moosems commented Jul 20, 2023

Use an event_generate for "threads" as tkinter isn't thread safe.

@littlewhitecloud
Copy link
Owner Author

Use an event_generate for "threads" as tkinter isn't thread safe.

Can you give an example to show how to use event_generate()?

@littlewhitecloud
Copy link
Owner Author

It seems that tkinter is thread safe now...? (In the new version)
I also find a closed issues talks about tkinter thread safe:
python/cpython#55286

@Moosems
Copy link
Collaborator

Moosems commented Jul 20, 2023

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()

@Moosems
Copy link
Collaborator

Moosems commented Jul 20, 2023

It seems that tkinter is thread safe now...? (In the new version)

I also find a closed issues talks about tkinter thread safe:

python/cpython#55286

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."

@Moosems
Copy link
Collaborator

Moosems commented Jul 21, 2023

Biscuit does it anyway though :).

@littlewhitecloud
Copy link
Owner Author

https://github.com/billyeatcookies/Biscuit/blob/main/biscuit/core/components/views/panel/terminal/terminal.py

I actually looked at this document as well, and I was thinking what is superfluous with ours

@Moosems
Copy link
Collaborator

Moosems commented Jul 22, 2023

I might just "copy" parts ;).

@littlewhitecloud
Copy link
Owner Author

Bruh, It seems that I almost forget there is a pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment