gettings mounted file systems [newbie]

Radovan Garabik garabik at center.fmph.uniba.sk.spam
Wed Jan 17 07:55:44 EST 2001


Moshe Zadka <moshez at zadka.site.co.il> wrote:
 : On Wed, 17 Jan 2001, Langa Kentane <LangaK at discoveryhealth.co.za> wrote:
 :> Greetings gurus.
 :> 
 :> I am trying to find a way how I can get a list of mounted file systems using
 :> python.
 :> How would I go about doing this? I have looked into the documentation and
 :> have not found anything to help.

 : Why not parse /etc/mtab?

maybe because it is linuxism?
it does not exist in BSD, neither in solaris, hpux, etc...
basically, you have no easy portable way, except of
walking through all possible mount points and checking
os.path.ismount()


-- 
 -----------------------------------------------------------
| Radovan Garabik  http://melkor.dnp.fmph.uniba.sk/~garabik |
| __..--^^^--..__         garabik @ fmph . uniba . sk       |
 -----------------------------------------------------------



More information about the Python-list mailing list