2dx

class pynwn.TwoDX(source)

2dx Files.

__repr__()

Returns repr of the 2dx as a string

__str__()

Returns a valid 2dx as a string

get(row, col)

Gets a 2dx entry by row and column label or column index.

get_column_index(col)

Gets the column index from a column label.

get_float(row, col)

Gets a 2dx entry by row and column label or column index as a float.

get_int(row, col)

Gets a 2dx entry by row and column label or column index as an int.

parse(content)

Parses a 2dx file.

set(row, col, val)

Sets a 2dx entry by row and column label or column index. The value passed is automatically coerced to str.

to_ContentObject()

Returns 2dx as a ContentObject. It’s .io contents are cStringIO buffer.

to_StringIO()

Returns 2dx written in a cStringIO buffer.