<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML ><HEAD ><TITLE >The knoda scripting tutorial</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="NEXT" TITLE="The various actions" HREF="chapter1.html"><META NAME="KEYWORD" CONTENT="hk_classes"><META NAME="KEYWORD" CONTENT="python"><META NAME="KEYWORD" CONTENT="scripting"><META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"><LINK REL="stylesheet" HREF="common/kde-common.css" TYPE="text/css"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META HTTP-EQUIV="Content-Language" CONTENT="en"><LINK REL="stylesheet" HREF="common/kde-localised.css" TYPE="text/css" TITLE="KDE-English"><LINK REL="stylesheet" HREF="common/kde-default.css" TYPE="text/css" TITLE="KDE-Default"><META NAME="KEYWORDS" CONTENT="hk_classes, python, scripting"></HEAD ><BODY CLASS="BOOK" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#AA0000" VLINK="#AA0055" ALINK="#AA0000" STYLE="font-family: sans-serif;" ><DIV CLASS="logoheader" ><A HREF="http://www.kde.org/" ></A ></DIV ><DIV CLASS="BOOK" ><A NAME="HK_CLASSES" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="TITLE" ><A NAME="AEN2" >The knoda scripting tutorial</A ></H1 >Version <SPAN CLASS="RELEASEINFO" >Version 0.0.1<BR></SPAN >Last updated: <SPAN CLASS="DATE" >10/16/2003<BR></SPAN ><H3 CLASS="AUTHOR" ><A NAME="AEN5" > Horst Knorr</A ></H3 ><DIV CLASS="AFFILIATION" ><DIV CLASS="ADDRESS" ><P CLASS="ADDRESS" ><TT CLASS="EMAIL" ><<A HREF="mailto:hk_classes@knoda.org" >hk_classes@knoda.org</A >></TT ></P ></DIV ></DIV ><DIV ><DIV CLASS="ABSTRACT" ><A NAME="AEN14" ></A ><P >knoda, or more exactly the hk_classes library, has an integrated python interpreter. For further information about python see <A HREF="http://www.python.org" TARGET="_top" >http://www.python.org</A >. This tutorial will not teach python, it will only show the hk_classes/python interface. This tutorial is by no means complete, it only exists now because the final documentation hasn't been written yet.</P ><P >The examples in this tutorial are based on the tables as described in the knoda tutorial. </P ></DIV ></DIV ><HR></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Table of Contents</B ></DT ><DT >1. <A HREF="chapter1.html" >The various actions</A ></DT ><DT >2. <A HREF="chapter2.html" >General object methods- the class hk_visible</A ></DT ><DT >3. <A HREF="chapter3.html" >Data sensitive methods</A ></DT ><DD ><DL ><DT >3.1. <A HREF="chapter3.html#HK_DSVISIBLE" >Objects of type hk_dsvisible - the class hk_datasource</A ></DT ><DT >3.2. <A HREF="hk_dsdatavisible.html" >Objects of type hk_dsdatavisible - the class hk_column</A ></DT ><DT >3.3. <A HREF="hk_presentation.html" >Objects of type hk_presentation - forms and reports</A ></DT ><DD ><DL ><DT >3.3.1. <A HREF="hk_presentation.html#HK_FORM" >Handling forms</A ></DT ><DT >3.3.2. <A HREF="hk_presentation.html#HK_REPORT" >Handling reports</A ></DT ></DL ></DD ></DL ></DD ><DT >4. <A HREF="chapter4.html" >using hk_classes as a Python module</A ></DT ><DD ><DL ><DT >4.1. <A HREF="chapter4.html#HK_DRIVERMANAGER" >hk_drivermanager</A ></DT ><DT >4.2. <A HREF="hk_connection.html" >hk_connection</A ></DT ><DT >4.3. <A HREF="hk_database.html" >hk_database</A ></DT ></DL ></DD ><DT >5. <A HREF="chapter5.html" >Tips and tricks</A ></DT ><DD ><DL ><DT >5.1. <A HREF="chapter5.html#SHOWDATA" >How to display the data</A ></DT ><DT >5.2. <A HREF="querydata.html" >How to execute a query</A ></DT ><DT >5.3. <A HREF="createtable.html" >How to create a table</A ></DT ></DL ></DD ></DL ></DIV ><DIV CLASS="LOT" ><DL CLASS="LOT" ><DT ><B >List of Figures</B ></DT ><DT >2-1. <A HREF="chapter2.html#AEN52" >Geometry specific methods</A ></DT ><DT >2-2. <A HREF="chapter2.html#AEN78" >Look and Feel methods</A ></DT ><DT >2-3. <A HREF="chapter2.html#AEN96" >Miscelleanous methods</A ></DT ><DT >2-4. <A HREF="chapter2.html#AEN116" >Predefined colour names</A ></DT ><DT >3-1. <A HREF="chapter3.html#HK_CLASSESOVERVIEW" >hk_classes overview</A ></DT ><DT >3-2. <A HREF="chapter3.html#HK_CLASSESOVERVIEW2" >description of the most important classes</A ></DT ><DT >3-3. <A HREF="chapter3.html#AEN181" >hk_datasource methods</A ></DT ><DT >3-4. <A HREF="hk_dsdatavisible.html#AEN228" >hk_column data methods</A ></DT ><DT >3-5. <A HREF="hk_dsdatavisible.html#AEN252" >hk_column type methods</A ></DT ><DT >3-6. <A HREF="hk_presentation.html#AEN307" >Type casting</A ></DT ></DL ></DIV ><DIV CLASS="LOT" ><DL CLASS="LOT" ><DT ><B >List of Examples</B ></DT ><DT >1-1. <A HREF="chapter1.html#AEN34" >Hello world-program</A ></DT ><DT >2-1. <A HREF="chapter2.html#AEN112" >Changing colour and position</A ></DT ><DT >3-1. <A HREF="chapter3.html#AEN215" >rowposition</A ></DT ><DT >3-2. <A HREF="chapter3.html#AEN218" >find a specific column</A ></DT ><DT >3-3. <A HREF="hk_dsdatavisible.html#AEN274" >Read data</A ></DT ><DT >3-4. <A HREF="hk_dsdatavisible.html#AEN277" >Write data</A ></DT ><DT >3-5. <A HREF="hk_dsdatavisible.html#AEN287" >Search data</A ></DT ><DT >3-6. <A HREF="hk_presentation.html#AEN330" >displaying a form</A ></DT ><DT >3-7. <A HREF="hk_presentation.html#AEN336" >displaying a report</A ></DT ><DT >3-8. <A HREF="hk_presentation.html#AEN346" >reportdata onprint</A ></DT ><DT >4-1. <A HREF="chapter4.html#AEN352" ></A ></DT ><DT >5-1. <A HREF="chapter5.html#AEN434" >Show data</A ></DT ><DT >5-2. <A HREF="querydata.html#AEN440" >Execute a "SELECT" query</A ></DT ><DT >5-3. <A HREF="querydata.html#AEN443" >Execute an action query</A ></DT ><DT >5-4. <A HREF="createtable.html#AEN450" >create table</A ></DT ></DL ></DIV ></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" > </TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="chapter1.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" > </TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >The various actions</TD ></TR ></TABLE ></DIV ></BODY ></HTML >