Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to "verify" your details, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUSHclient
➜ Python
➜ How to define a python function like wait.regexp() in lua?
How to define a python function like wait.regexp() in lua?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Lichleo
(6 posts) Bio
|
Date
| Wed 29 Jun 2022 01:25 PM (UTC) |
Message
| To define a python function like wait.regexp() in lua, shall I use yield or thread?
Is there any example? | Top |
|
Posted by
| Fiendish
USA (2,533 posts) Bio
Global Moderator |
Date
| Reply #1 on Thu 30 Jun 2022 05:25 AM (UTC) |
Message
| 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. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Nick Gammon
Australia (23,070 posts) Bio
Forum Administrator |
Date
| Reply #2 on Thu 30 Jun 2022 05:56 AM (UTC) |
Message
| 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. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
5,976 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top