[Tutor] Test If File System is mounted in Linux

Michael Lange klappnase at freenet.de
Fri Mar 17 13:12:00 CET 2006


On Fri, 17 Mar 2006 00:36:35 -0700
fortezza-pyt <fortezza-pyt at fortezzazone.org> 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() .

HTH

Michael


More information about the Tutor mailing list