statvfs clearance

Dave Angel davea at ieee.org
Sat Apr 4 11:23:52 EDT 2009



Hrvoje Niksic wrote:
> Sreejith K <sreejithemk at gmail.com> writes:
>
>   
>> Python's statvfs module contains the following indexes to use with
>> os.statvfs() that contains the specified information
>>
>> statvfs.F_BSIZE
>>     Preferred file system block size.
>>     
> [...]
>   
>> statvfs.F_NAMEMAX
>>     Maximum file name length.
>>
>> Can anyone tell me (or give me some links to know) what are these
>> values ? The first three I know, I need to know about the rest....
>>     
>
>   
The following web page describes them:
    http://docs.python.org/library/statvfs.html
but you already knew that much.  So what are you really asking for?
> You can simply print them, they are integers:
>
>   
>>>> import statvfs
>>>> statvfs.F_FLAG
>>>>         
> 8
>
>   
But those values may be specific to a particular python implementation.  
No reason to assume they'd be the same across OS platforms, or between 
versions 2.5 and 2.6.  The whole thing is deprecated, and is eliminated 
in 3.0

The term we used to use for these is "magic numbers."   Using 
magic-numbers directly in your code is a good way to ensure future time 
debugging.




More information about the Python-list mailing list