utils
index
/Users/hollis/Desktop/nakedmud/lib/pymodules/utils.py

################################################################################
#
# utils.py
#
# Various utility functions used by other Python modules.
#
################################################################################

 
Modules
       
mud

 
Functions
       
aan(word)
return "a" or "an", depending on the word.
build_show_list(ch, list, s_func, m_func=None, joiner='\r\n', and_end=False)
builds a list of things to show a character. s_func is the description if
there is only a single item of the type. m_func is the description if
there are multiple occurences of the thing in the list
chk_conscious(ch, cmd)
find_all_chars(looker, list, name, proto=None, must_see=True)
returns a list of all the chars that match the supplied constraints
find_all_objs(looker, list, name, proto=None, must_see=True)
returns a list of all the objects that match the supplied constraints
find_char(looker, list, num, name, proto=None, must_see=True)
returns the numth char to match the supplied constraints
find_obj(looker, list, num, name, proto=None, must_see=True)
returns the numth object to match the supplied constraints
get_count(str)
separates a name and a count, and returns the two
has_proto(ch, proto)
returns whether or not the character has on his or her person an object
that inherits from the given prototype
is_keyword(kw, word, abbrev_ok=False)
returns whether or not the word (or list of words) is a keyword
is_one_keyword(kw, word, abbrev_ok=False)
returns whether or not the single word is a keyword in the list
olc_display_table(sock, list, num_cols, disp=<function <lambda> at 0x767e70>)
used by OLC functions to display a list of options in a table form.
Also displays each option's position number and colorizes everything.
parse_keywords(kw)
turns a comma-separated list of strings to a list of keywords
show_list(ch, list, s_func, m_func=None)
shows a list of things to the character. s_func is the description if
there is only a single item of the type. m_func is the description if
there are multiple occurences of the thing in the list