alias splitting

Bryan Muir <bmuir-/y8/[email protected]>
Newsgroups gmane.comp.games.mud.client.lyntin
Message-ID <1064256813.19863.18.camel@eyrie>
Will,

I am working on a graphical form to help with the
creation/deletion/modification of aliases.

I have the adding and creating of alias's working from the wxPython
form.. but I have run into something that i was wondering about.

I want the form to be able to update itself and show all the aliases and
actions that are defined.  When my form is displayed, I want it to query
the lyntin alias manager and parse the results.

I have been using the following code to get a list of the aliases.

 ses = exported.get_current_session()
 am = exported.get_manager("alias")
 defined_aliases = am.getInfo(ses)

This returns a list such as...
['alias {flop} {sit}', 'alias {unflop} {stand}']

now I can simply take each element.. trim off the 'alias {' , search for
the first '} {', and continue parsing it by hand...

But I was wondering if there was a method already made that will send
back the alias and its expansion.  Or does someone have a good code
snippet to do this a bit more elegantly than my brute force method...

I have been searching through the alias.py file.. and also through the
utils module.. but so far I havent found anything that does it..

I'm probably overlooking the obvious.. 

Bryan Muir


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.