Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

fetools.alias

Teddy edited this page Aug 5, 2021 · 8 revisions
  • class AliasCommands

    Object to store and manipulate alias commands.

    Interact with an AliasCommands object like you would with a dictionary:

    >>> ac = AliasCommands()
    >>> ac[".goodbye"] = ".msg $aircraft Shalom!"  # Add/set an alias
    >>> ac[".goodbye"]  # View an alias
    '.msg $aircraft Shalom!'
    >>> del ac["goodbye"]  # Remove an alias
    • AliasCommands.items(), AliasCommands.keys(), AliasCommands.values()

      Does the same thing as a dictionary's items(), keys(), and values() methods.

    • AliasCommands.dumps(client)

      Outputs a string representation of AliasCommands. client must be either "vrc", "vstars", or "veram".

    • AliasCommands.dump(file_obj, client)

      Calls AliasCommands.dumps(client) and writes the output to file_obj (must be an open file object).

    • AliasCommands._dumpxml()

      Returns the aliases in the vSTARS/vERAM format as an xml.etree.ElementTree.Element python object.

  • loads(text)

    AliasCommands factory function. Gets alias commands from the string text (if in VRC/vSTARS/vERAM format).

  • load(file_obj)

    AliasCommands factory function. Calls loads(file_obj.read()) and returns the returned AliasCommands object.

Clone this wiki locally