How to define a python function like wait.regexp() in lua?

Posted by Lichleo on Wed 29 Jun 2022 01:25 PM — 3 posts, 11,797 views.

#0
To define a python function like wait.regexp() in lua, shall I use yield or thread?

Is there any example?
USA Global Moderator #1
This is not a question that one can answer for you. Do whatever accomplishes your needs.

Quote:
Is there any example?

I can't think of any.
Australia Forum Administrator #2
wait.regexp() relies heavily on the coroutine functions provided in Lua. I do not know of the equivalent in Python, however there may be one.

I suggest you use Lua - a lot of the examples on this site are written in Lua, and a lot of the useful extension modules supplied with the client (such as the "wait" module) are written in Lua.