On 17/03/06, Bill Campbell <[EMAIL PROTECTED]> wrote:
> On Fri, Mar 17, 2006, Michael Lange wrote:
> >On Fri, 17 Mar 2006 00:36:35 -0700
> >fortezza-pyt <[EMAIL PROTECTED]> wrote:
> >
> >> If there a semi-standard way to test if a file system has been mounted
> >> or not using Python? In the Linux command line, I can type "mount" and
> >> see all mounted file system, and then see if the one I am looking for is
> >> in the list. While I could replicate this with
> >> Python, I am curious if there is an easier way.
> >>
> >
> >Hi Fortezza,
> >
> >try os.path.ismount() .
>
> That's fine if one knows what the mount points are.
>
> The more general problem is to get a list of mounted file systems.
>
How about just reading the mtab? That's usually /etc/mtab it should be
readable as a user and it means you don't have to rely on any other
programs.
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor