sheeshmohsin Mount Assignment 20130711-095815


Posted:

The assignment was to write a program using python which prints the same output as in file /proc/mounts.

The python program written by me can be run using:-

$ python mount.py

# or, if it is executable, then using this command:-

$./mount.py

My coded file is at this link

Explanation of my code

fp = open("/proc/mounts")

"""
This line open the file /proc/mounts
"""

print fp.read()

"""
This line read and print the file.
"""

fp.close()

"""
This line closes the opened file.
"""
Contents © 2013 dgplug - Powered by Nikola
Share
UA-42392315-1