<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML ><HEAD ><TITLE >The Python script</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Gaby's documentation" HREF="index.html"><LINK REL="UP" TITLE="Printing" HREF="c898.html"><LINK REL="PREVIOUS" TITLE="The XML file" HREF="x912.html"><LINK REL="NEXT" TITLE="Automagically generated reference" HREF="c967.html"></HEAD ><BODY CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Gaby's documentation</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="x912.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Chapter 12. Printing</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="c967.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="AEN944" >12.4. The Python script</A ></H1 ><P >The informations about the user choice will be in gaby.PrintDict</P ><P ></P ><UL ><LI ><P >For fields page: a list of field numbers</P ></LI ><LI ><P >For records page: a list of records</P ></LI ><LI ><P >For order page: a field number</P ></LI ><LI ><P >For filesel and entry widgets: the text of the entry</P ></LI ><LI ><P >For checkbox widgets: true or false (actually 0 or 1)</P ></LI ></UL ><P >Misc comments: <P ></P ><UL ><LI ><P > The gaby python module is automatically loaded. (refer to its documentation) (actually it might be quicker to refer to existing plug-ins)</P ></LI ><LI ><P >you shouldn't sys.exit(0), use 'raise' to abort</P ></LI ><LI ><P > you should put the text strings through gaby.gettext so they are translated in the user language. The common way to do this: <PRE CLASS="PROGRAMLISTING" >>>> _ = gaby.gettext >>> f.write( _("Sample document") ) </PRE ></P ></LI ></UL > </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="x912.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="c967.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >The XML file</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="c898.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Automagically generated reference</TD ></TR ></TABLE ></DIV ></BODY ></HTML >