added file() function to res class in pyclass formatting