The file below is a simple script to test this package.
-------------
# test_asynctk.py
import asynctk as atk
root = atk.AsyncTk()
def delay5S():
btn0.after(5000)
def inc1():
msgs = btn1.cget('text').split()
n = int(msgs[1])
msg = msgs[0] + ' ' + str(n+1)
btn1.config(text=msg)
btn0 = atk.AsyncButton(root, text='delay 5s', command=delay5S)
btn0.pack()
btn1 = atk.AsyncButton(root, text='increment 0', command=inc1)
btn1.pack()
if __name__ == "__main__":
root.mainloop()
-------------
After import this script and press the increment button, the following error
appears. No idea how to use it correctly. Any help?
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import test_asynctk
# press the button
>>> Exception in Tkinter callback
Traceback (most recent call last):
File "H:\WPy-3710Zero\python-3.7.1\lib\tkinter\__init__.py", line 1705, in
__call__
return self.func(*args)
File "H:\Works\Python34\asynctk-master\asynctk\_lib.py", line 1615, in
<lambda>
kw["command"] = lambda *i: asyncio.ensure_future(kw["command"](*i))
File "H:\Works\Python34\asynctk-master\asynctk\_lib.py", line 1615, in
<lambda>
kw["command"] = lambda *i: asyncio.ensure_future(kw["command"](*i))
File "H:\Works\Python34\asynctk-master\asynctk\_lib.py", line 1615, in
<lambda>
kw["command"] = lambda *i: asyncio.ensure_future(kw["command"](*i))
[Previous line repeated 995 more times]
RecursionError: maximum recursion depth exceeded
--Jach
--
https://mail.python.org/mailman/listinfo/python-list