Python Samples
--------------
1 Python Sample Files Purpose
2 How to install Python on Linux
3 How to install Python on Windows
4 How to Run Python Samples

1 Python Sample Files Purpose
-----------------------------
   This directory contains some Python examples which illustrate 
   how to use Python DBAPI to connect DBMaker.

   catalogs.py      ==>Catalog function testing (not defined in DBAPI).
   cursors.py       ==>Get the maximum number of cursors DBMaker can create.
   datetimeformat.py==>Insert datetime column with different formats, and
                    ==>present datetime data with different formats.
   fetch.py         ==>Fetch methods testing.
   getinfo.py       ==>ODBC getinfo (not defined in DBAPI).
   showtable.py     ==>An interactive sample to show the content of a table.
   transact.py      ==>Transaction testing.

2 How to install Python on Linux
-------------------------------------
   (1) install the ODBC driver for DBMaker on Linux:      
	   Verify that you have installed DBMaker ODBC driver 
	   Verify that you have installed UnixODBC
	   
   (2) install python and pyodbc package
       If you don't already have Python, install the Python runtime and Python Package Index (PyPI) package manager from python.org.
       please reference https://www.python.org/downloads/
	   
	   install Python-3.12.5.tar.xz (primary source code)
       tar xvJf Python-3.12.5.tar.xz
       cd ./Python-3.12.5
       ./configure --enable-optimizations
       sudo make -j4 && sudo make altinstall
       python3.12 --version && pip3.12 --version
	   
	   Install the pyodbc package
	   pip install pyodbc
	   
	   Check installed packages with pip list
	   pip list

3 How to install Python on Windows
----------------------------------
   (1) install the ODBC driver for DBMaker on Windows
	   Verify that you have installed the driver
   
   (2) install python and pyodbc package
       If you don't already have Python, install the Python runtime and Python Package Index (PyPI) package manager from python.org.
       please reference https://www.python.org/downloads/
	   
	   Install the pyodbc package
	   pip install pyodbc
	   
	   Check installed packages with pip list
	   pip list         
       
4 How to Run Python Samples
---------------------------
   (1) To run these samples, firstly start the DBMaker sample database:
       dmserver dbsample5
       
   (2) Then run the programs by typing
       python XXX.py