                    ===========================
                    Python Support for SWIG 1.3
                    ===========================


===========
Description
===========

This package contains tools that assist in developing Python
modules that process the XML output from SWIG (generated with the
"-xml" SWIG option).  In particular, generateDS.py and the XML Schema
document in this package (swigxml15.xsd) generate Python classes
that represent the elements in the XML documents generated by SWIG
1.3 along with code that builds instances of these classes from an
XML document.  You can add your own code to process this content.


============
Instructions
============

Steps for using generateDS.py to produce and use Python files that
process the output from SWIG 1.3

1. Generate the Python files with run_generate (which runs
    generateDS.py):

        ./run_generate

    Or, something like:

        ./generateDS.py -o testsuper.py -s testsub.py swigxml15.xsd

    Generate new subclasses with:

        ./generateDS.py -s testsub.py swigxml15.xsd

2. Generate the XML description of an interface with something like
the following:

        swig -xml -c++ -importall test1.i

3. Test the Python superclass file by using the generated file to
    read and write out the contents of the XML output from SWIG. 
    For example:

        python testsuper.py test1.xml

4. Add your application-specific code to the subclasses in the
    Python subclass file.  Also, there are several other edits that
    you will need to make.  Search for "???".

5. Run your application-specific code by executing the Python
    subclass file.  For example:

        python testsub.py test1.xml



================
Additional notes
================

There is a bit of documentation on generateDS.py and the files it
generates at:

        http://www.rexx.com/~dkuhlman/#generateDS
        http://www.rexx.com/~dkuhlman/generateDS.html

The included version of generateDS.py is slightly modified version
of what is at this Web site.

You will need minidom in order to run this.  minidom is part of the
Python 2.2.1 distribution, I believe.  But I've installed PyXML on
my machine, so I've never tried the stuff included with Python. 
Therefore, you may have to install PyXML in order to use
generateDS.py and the files it generates.  PyXML is available at:

    http://pyxml.sourceforge.net/
    http://www.python.org/sigs/xml-sig/.

My testing has been done with SWIG version 1.3.15.


=================================================
License agreement for Python Support for SWIG 1.3
=================================================

Copyright (c) 2002 Dave Kuhlman

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



Dave Kuhlman
dkuhlman@rexx.com
http://www.rexx.com/~dkuhlman

