title: In Python, how can I get the file system of a given file path
body: <p>In python, given a directory or file path like /usr/local, I need to get the file system where its available.  In some systems it could be / (root) itself and in some others it could be /usr.</p>
  
  <p>I tried os.statvfs it doesnt help.  Do I have to run the df command with the path name and extract the file system from the output?  Is there a better solution?</p>
  
  <p>Its for linux/unix platforms only.</p>
  
  <p>Thanks</p>