By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,925 Members | 732 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,925 IT Pros & Developers. It's quick & easy.

Re: Getting Linux partition info programmatically

P: n/a
python dev wrote:
Hello everyone,

I am trying to get a list of all the partitions (along with their respective
file system types) listed in the /media directory. Does anybody know if
there is a way to do this using Python, or do I have to get this information
by parsing the output of a Linux command?
The /sys and /proc file system provide all the information you need:

for line in open("/proc/mounts"):
...

Christian

Sep 12 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.