Have a look at the README file in the same contrib/python directory.
You cannot use directly nwgeom.py from python, but from the NWChem input files, as in the nh3.nw example, instead.
cd $NWCHEM_TOP/contrib/python
PYTHONPATH=`pwd` ../../bin/LINUX64/nwchem n3h.nw