Put this _curses.so file in a directory that is on your PYTHONPATH. Be sure to
chmod ugo+xit, too.
Or build it from source yourself, using the following shell script:
#!/usr/pkg/bin/bash
TEMPDIR=/tmp/${USER}$$
My_Python_Modules_Dir=${HOME}/PyModules
if [[ ! -d ${My_Python_Modules_Dir} ]]; then
echo "Please edit the script and change My_Python_Modules_Dir to"
echo "point to the directory where you keep your python modules."
echo "(You may need to create this directory and put it in your"
echo "PYTHONPATH environment variable.)"
exit -1
fi
mkdir ${TEMPDIR} &&
cd ${TEMPDIR} &&
wget http://www.python.org/ftp/python/2.3.6/Python-2.3.6.tar.bz2 &&
tar xjvf Python-2.3.6.tar.bz2 Python-2.3.6/Modules/_cursesmodule.c &&
mv -v Python-2.3.6/Modules/* . &&
python - build <<'ENDofDISTUTILscript' &&
from distutils.core import setup, Extension
module1 = Extension('_curses',
define_macros = [('HAVE_NCURSES_H', '1')],
include_dirs = ['/usr/pkg/include'],
libraries = ['ncurses'],
library_dirs = ['/usr/pkg/lib'],
sources = ['_cursesmodule.c'])
setup (name = '_curses Module',
version = '1.5b1',
description = '_curses module',
ext_modules = [module1])
ENDofDISTUTILscript
mv -v build/lib.netbsd-2.1.0_STABLE-alpha-2.3/_curses.so \
${My_Python_Modules_Dir} \
&& echo "Done. Be sure to add ${My_Python_Modules_Dir} to your PYTHONPATH \
environment variable."