Partition names with Python

Andrew Bennetts andrew-pythonlist at puzzling.org
Tue Jul 1 04:25:46 EDT 2003


On Tue, Jul 01, 2003 at 02:45:15AM +0000, Bengt Richter wrote:
> 
> You might want to try something like
> 
>     import os
>     print os.popen('mount').read()

Or simply reading /etc/mtab or perhaps /proc/mounts (this one is
linux-specific, I think), rather than spawning a process.

-Andrew.






More information about the Python-list mailing list