469,344 Members | 6,476 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,344 developers. It's quick & easy.

Re: Getting Linux partition info programmatically

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
0 1155

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by cantabile | last post: by
reply views Thread by Rvk | last post: by
6 posts views Thread by Bill Mill | last post: by
5 posts views Thread by sameer_deshpande | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.