How do I prevent Python's os.walk from walking across mount points?
In Unix all disks are exposed as paths in the main filesystem, so `os.walk('/')` would traverse, for example, `/media/cdrom` as well as the primary hard disk, and that is undesirable for some applications.

How do I get an `os.walk` that stays on a single device?
How do I prevent Python's os.walk from walking across mount points?
===

In Unix all disks are exposed as paths in the main filesystem, so `os.walk('/')` would traverse, for example, `/media/cdrom` as well as the primary hard disk, and that is undesirable for some applications.

How do I get an `os.walk` that stays on a single device?