Google Answers Logo
View Question
 
Q: Python on BSD and the os.statvfs function ( Answered,   1 Comment )
Question  
Subject: Python on BSD and the os.statvfs function
Category: Computers > Programming
Asked by: smccallum-ga
List Price: $10.00
Posted: 01 Jun 2002 20:10 PDT
Expires: 08 Jun 2002 20:10 PDT
Question ID: 20152
I would like to know why the standard Python build on BSD does not
seem to include the statvfs function.  I would also like to know if
there is another way to collect the same information as this function
provides...
Answer  
Subject: Re: Python on BSD and the os.statvfs function
Answered By: rainbow-ga on 02 Jun 2002 16:24 PDT
 
Hi there!

After searching for possible reasons this function is not included, I
visited the Python web site:
http://www.python.org/

I emailed their support there asking them this particular question and
received this reply:

"That's probably because the OS's C library doesn't provide the
function. I can only check FreeBSD but it certainly doesn't and I'd
be surprised if it were in other BSDs.
There's a rejected patch at:

http://sourceforge.net/tracker/?group_id=5470&atid=305470&func=detail&aid=444750

that provides approximately-similar functionality using BSD's
statfs() call. You could almost certainly apply it to your own copy
of the Python source. It appears that it was rejected because the
return values can be subtly different from statvfs's.

You might also be able to get some of the information you want by
using popen() to run one or another system command and parse its
output."

At the sourceforge webpage mentioned above, you have to register to
access any information there. The url for this is:

http://sourceforge.net/account/register.php

Other sites concerning popen to look into:

PHP for Netware:
http://www.php.net/manual/en/function.popen.php

The Open Group Organization:
http://www.opengroup.org/onlinepubs/007908799/xsh/popen.html
http://www.opengroup.org/onlinepubs/007904975/functions/popen.html

"MKS Software" [which provides solutions for software configuration
management, availability monitoring, system administration &
development task automation]:
http://www.mkssoftware.com/docs/man3/popen.3.asp

search words used in google:
Python build  BSD statvfs function
://www.google.com/search?sourceid=navclient&q=Python+build++BSD+statvfs+function

I hope this helps you.

rainbow-ga
Comments  
Subject: Re: Python on BSD and the os.statvfs function
From: politicalguru-ga on 02 Jun 2002 00:12 PDT
 
I couldn';t answer because someone else had locked the question but
here's a discussion list for you that provides suitable patches and
explanations: http://mail.python.org/mailman/listinfo/patches

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy