Edit a file using pexpect python

Hi

I am damn new to this python scripting
I have arrived till getting into the console of a machine using pexpect
Now I just wanted to know how to list/edit the contents of a file using pexpect
Please help:confused: