LHAPDF Python wrapper libraryAs of version 5.4, LHAPDF provides a Python wrapper package, based around the C++ interface. To use the Python wrapper, first make sure that LHAPDF is installed properly and was built with Python support (this is the case by default). Then make sure that the installed _lhapdf.so and lhapdf.py files are in a directory listed in your PYTHONPATH shell variable. This installation directory should be $prefix/lib/python$PYTHONVERSION/site-packages, so if LHAPDF was configured with a --prefix=/foo flag, then your PYTHONPATH should contain /foo/lib/python2.5/site-packages. We recommend that you install packages to one standard location, so that your PYTHONPATH can be set to one value in your shell setup scripts and not need to be changed. Now run Python and import the module: $ python >>> import lhapdf >>> lhapdf.initPDFSetByName("MRST2004nlo.LHgrid") >>> lhapdf.initPDF(0) >>> print "alpha_s(Mz) = ", lhapdf.alphasPDF(91.2) |