[Tutor] Checking to see whether or not a filesystem is mounted--?

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Mon Aug 9 20:01:13 CEST 2004



On Sat, 7 Aug 2004, Marv Boyes wrote:

> Hello, all. Having a great time here-- this list is an excellent
> complement to my newbie reading on Python. I never imagined that a
> robust, full-featured programming language would be so easy and
> enjoyable to learn.
>
> Anyway, enough preamble. I'm wanting to write a small graphical applet
> for mounting and unmounting filesystems with a button-press. Can anyone
> suggest a method for testing whether or not a particular filesystem is
> mounted (so I can inform the user with a message dialog)?

Hi Marv,


David McClosky wrote a library for detecting mount points:

    http://bebop.bigasterisk.com/python/docs/MtPython
    http://bebop.bigasterisk.com/python/MtPython-1.0.tar.gz

and there appear to be a 'mounted_only' option that you can check to see
if something is really mounted already.


Good luck!



More information about the Tutor mailing list