Closed MichaelDeCortix closed 2 years ago
Thank you. I've noticed that issue some time ago as well and created a issue on nimpy (https://github.com/yglukhov/nimpy/issues/189).
Guess the only solution to this is using another c compiler (clang/vcc) to compile pymeow. I'll give it some test's in the next release.
Thank you. I've noticed that issue some time ago as well and created a issue on nimpy (yglukhov/nimpy#189).
I see that the problem is quite old and apparently no one is interested in solving it...
Guess the only solution to this is using another c compiler (clang/vcc) to compile pymeow. I'll give it some test's in the next release.
I will look forward to the new release, because serious projects cannot be done with your library at the moment, threads are required (especially for overlay). If I succeed, I will try to compile your source code in other compilers and test the library with threads. No promises, but if I get results, I'll be sure to let you know.
Thank you for your work!
So here's a VCC build of the current master branch. If you could check it out and let me know if everything works I'll make it standard for windows.
Uninstall pymeow via pip and use the library in the same directory as your script pymeow_vcc.zip .
So I made a small test on my windows vm which seems to work
from pymeow import *
import threading
import requests
from time import sleep
from random import randint
colors = requests.get("https://gist.githubusercontent.com/mordka/c65affdefccb7264efff77b836b5e717/raw/e65646a07849665b28a7ee641e5846a1a6a4a758/colors-list.txt").text.splitlines()
threads = list()
def thread_f(i, name):
sleep(randint(1, 3))
print(f"({i}) Color: {name} RGB: {rgb(name)}")
for i, c in enumerate(colors):
t = threading.Thread(target=thread_f, args=(i, c))
threads.append(t)
[t.start() for t in threads]
[t.join() for t in threads]
It works! But I don't have time to test everything yet. If there are any problems, I'll be sure to write here.
Thanks again!
Library ver: 1.6 Python: 3.10.4; 3.9.10 | Both have the same problem OC: Windows 11
Simple example:
In this example, the script crashes after calling read_int(). The same goes for any other function in the thread.
try/except doesn't help. It crashes without any errors.