\contentsline {section}{\numberline {1}Introduction}{2}{section.1} \contentsline {section}{\numberline {2}Installation prerequisites}{2}{section.2} \contentsline {section}{\numberline {3}Generating the c interface - the SWIG file}{3}{section.3} \contentsline {subsection}{\numberline {3.1}Exceptions}{5}{subsection.3.1} \contentsline {subsection}{\numberline {3.2}Exceptions}{9}{subsection.3.2} \contentsline {section}{\numberline {4}Docstrings}{10}{section.4} \contentsline {section}{\numberline {5}Wrappers}{10}{section.5} \contentsline {section}{\numberline {6}Building python extensions - the setup file}{62}{section.6} \contentsline {section}{\numberline {7}Building and testing the resulting package}{62}{section.7} \contentsline {section}{\numberline {8}Debugging compiled extensions}{63}{section.8} \contentsline {section}{\numberline {9}Things which are currently missing}{64}{section.9} \contentsline {section}{\numberline {10}Testing}{64}{section.10} \contentsline {subsection}{\numberline {10.1}Read a file based on cif2cbf.c}{64}{subsection.10.1} \contentsline {subsection}{\numberline {10.2}Try to test the goniometer and detector}{65}{subsection.10.2} \contentsline {subsection}{\numberline {10.3}Test cases for the generics}{66}{subsection.10.3} \contentsline {section}{\numberline {11}Worked example 1 : xmas beamline + mar ccd detector at the ESRF}{66}{section.11} \contentsline {subsection}{\numberline {11.1}Reading marccd headers}{66}{subsection.11.1} \contentsline {subsection}{\numberline {11.2}Writing out cif files for fit2d/xmas}{72}{subsection.11.2} \contentsline {subsection}{\numberline {11.3}A template cif file for the xmas beamline}{76}{subsection.11.3}