Subject: Re: Installing the latest Python as "python"
To: None <>
From: Ty Sarna <>
List: tech-pkg
Date: 05/16/2003 13:21:48
In article <> you write:
> AFAIK it will be done for NetBSD if -current's thread implementation is 
> mature enough. For other systems (with native pthreads) lang/python22 is 
> already built with threading support.
> What's IMHO really needed (to also get rid off python*-pth) is a clean way 
> to find out if the installed Python has threading support or not. Without 
> doing some ldd/grep (black-)magic. IMHO a Makefile knob like 
> USE_PYTHON_THREADED=YES instead of requiring a specific python*-pth version 
> would be best.

python2.2 -c "import sys;print 'thread' in sys.builtin_module_names"


python2.2 -c "import sys;sys.exit('thread' not in sys.builtin_module_names)"

depending on wether stdout or an exit value is more convenient.
Note the latter verson inverts the value to be compatible with
/bin/{true,false}'s inverted return values.