title: Removing dir contents from single file system in Python
body: <p>The <code>rm</code> command allows you to do something like this:</p>
  
  <pre><code>rm -rf --one-file-system /path/to/dir/
  </code></pre>
  
  <p>And it will error out (skipping removal) if the contents of that dir have other file systems mounted in them.</p>
  
  <p>Is there a module in Python that allows me to specify a similar behavior? If not, what would be the alternative to enforce such a constraint?</p>