Re: exported.writes inside a hook threadlock?
will guaraldi <[email protected]>
| Newsgroups | gmane.comp.games.mud.client.lyntin |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 12 Apr 2004 [email protected] wrote: > > --> Monday, April 12, 2004, 3:29:49 PM, [email protected] wrote: > > > On Mon, 12 Apr 2004 [email protected] wrote: > >> > >> Because I want to know how to do it in a module. The "actions" > >> I will be implementing are complex and deal with multiple lines > >> of text at different times among other things. > > > Ok. Well, in that case I would either take the existing action module > > and extend it to add the functionality you need or use it as a basis > > to implement the functionality you need. > > > The action module is in lyntin/modules/action.py > > Can anyone show me how to parse text from a mud an act on them apart > from using actions? I know how to use actions and I know I cannot use > them now. I don't want more action-like functionality, I want to write a > complex Python module. I have tried but run into this infinite loop > problem, am I supposed to be using another hook? > > The documentation in engine.py made me think to_user_hook was my only > option, but sometimes I see other hooks elsewhere, and really I am not > sure what hook I would want to use to begin with... > > Is there another reason this question is so difficult to answer? I think the difficulty in answering your question to your liking so far is that you haven't really provided a specific enough question to answer. What you're describing is exactly what the action module does, though you've added the additional issue of "wanting to do things over multiple lines" which the action module does not do (at least, I don't think it does--I certainly don't use it for that). I suggested you read through the action module and base your module on the structure there. The hooks you want to use will be the same. The things you want to do will likely be done the same. The differences between your module and the action module will be whatever you need to change to solve your specific problem which you've outlined very vaguely. I've answered your question as best as I can. My advice is to go look at the code in lyntin/modules/action.py and model your module after that one. If that's still a crummy answer, provide more specifics as to what you're trying to do. Usage scenarios might help. /will ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click