Create directory v.mkdir('/dir1') # List directories v.listdir('/') # Create new file and write to it with v.fopen('/somefile.txt', 'w') as f: f.write("Winter is coming.") # Open and read file with v.fopen('/somefile.txt', 'r') as f: print f.read() # Delete file v.unlink('/somefile.txt') # Unmount v.umount() # Create directory os.mkdir('/dir1') # List directories os.listdir('/') # Create new file and write to it with open('/somefile.txt', 'w') as f: f.write("Winter is coming.") # Open and read file with open('/somefile.txt', 'r') as f: print f.read() # Delete file os.unlink('/somefile.txt')