Vmf API (How it starts)

class valvevmf.Vmf(path=None)[source]

Bases: HoldsNodesAbstract

This is the basic class to interact with vmf files, it is mostly a collection of VmfNodes.

__init__(path=None)[source]

initalize a Vmf file.

Parameters:

path (str, optional) – The location of the vmf file to be parsed, saved as source_path.

source_path
Type:

(str) - The location of the parsed file

save(destination=None)[source]

Saves the current instance of the Vmf. Overwrites original vmf file if no destination is provided.

Parameters:

destination (str, optional) – A path (directory + filename) to determine where to save the vmf file.