File size error in os.stat with large files.

Skip Montanaro skip at pobox.com
Tue Jul 9 20:08:51 EDT 2002


    >> If it returns '0', LFS is not enabled.  if it returns '0L', LFS is
    >> enabled.

    François> Clever.  Yet it seems that, in the long run, Python evoluation
    François> plan is to abolish user-visible distinction between usual
    François> integers and long integers.  So I wonder if, despite the trick
    François> above might work for some while, it is really safe relying on
    François> it for programs meant to live a looong life :-).

It seems to me that exposing interpreter build options via the sys module
would be a Good Thing.  You can mess around with
distutils.sysconfig.get_config_var("CPPFLAGS"), but that is a bit fragile
(the format can change over time or across compilers, making it difficult to
write robust code that sniffs out the useful bits).  Then again, maybe
that's by design.  Still, I think it ought to be easy to discover at runtime
if large file support, threading, or other optional capabilities were
compiled into the interpreter.

-- 
Skip Montanaro
skip at pobox.com
consulting: http://manatee.mojam.com/~skip/resume.html





More information about the Python-list mailing list