[Python-Dev] Modules of plat-* directories

Victor Stinner victor.stinner at haypocalc.com
Mon Oct 17 02:04:38 CEST 2011


Le lundi 17 octobre 2011 01:16:36, Victor Stinner a écrit :
> For example, IN.INT_MAX is 2147483647, whereas it should
> be 9223372036854775807 on my 64-bit Linux.

Oops, wrong example: INT_MAX is also 2147483647 on 64 bits. I mean 
IN.LONG_MAX.

IN.LONG_MAX is always 9223372036854775807 on Linux, on 32 and 64 bits systems.

> [Arfrerever] also suggested somewhere to regenerate these modules
> when Python is built.

somewhere is here:
http://bugs.python.org/issue12619

> DLFCN is used by PyKDE4:
> sys.setdlopenflags(DLFCN.RTLD_NOW|DLFCN.RTLD_GLOBAL). I didn't know this
> sys function :-)

Because Python has a sys.setdlopenflags(), we should provide these constants in 
a regular module (sys or posix). I'm quite sure that PyKDE4 would accept to 
add a try/except ImportError: DLFCN is only used in one file, to get 2 
constants.

Victor


More information about the Python-Dev mailing list