There is a new version of generateDS.py -- version 2.19a.

You should be wary of this release.  There are significant code
changes for the Python 3 support.  Please do some serious
checking and testing.

You can find it here:

- Python Package Index -- http://pypi.python.org/pypi/generateDS/
- Source Forge -- http://sourceforge.net/projects/generateds/
- Bitbucket -- For those of you who prefer using Mercurial, there is
  also a Mercurial repository at Bitbucket:
  https://bitbucket.org/dkuhlman/generateds

Below are a few notes and details from the README.

If you have comments, suggestions, or problems, please send them
along.  The email list is here:
https://lists.sourceforge.net/lists/listinfo/generateds-users

Dave

# =========================================================

Version 2.19a (02/08/2016)

- Added the ability to generate code that can run under Python 3.
  Use the "--py3" command line option.  Note that if you generate
  code for Python 2 (the default), then you must run that generated
  code under Python 2.  And, if you generate code for Python 3,
  then you must run that generated code under Python 3.  There is
  currently no way to generate code that will run under both Python
  2 and Python 3.
- Modifications so that generateDS.py itself can be run with either
  Python 2 or Python 3.
- Fixed the template (TEMPLATE_HEADER) so that it uses the format
  function and keyword arguments.
- Added info on --py3 command line option to doc (generateDS.txt).
- Added new script (fix_subclass_refs.py) that can be used to fix-up
  (change) which subclass file (of two or more that were generated
  with the -s command line option) is used by the superclass file
  when parsing an XML instance document.  This will enable you to
  use the -s option to generate multiple subclass files, add
  different code to each of them, and then parse documents and
  create instances of classes from one then another during the same
  run.  But also, see next item.
- Added generation of code to lookup the subclass of a generated
  class using a global variable containing the subclass module.
  This provides an alternative and more convenient way to do the
  above (i.e., use fix_subclass_refs.py to select from multiple
  subclass files generated with the -s command line option).
  However, there may be tasks that can be performed with that script
  or a modified version of it that cannot be done with this approach
  using a global variable.  Here is a sample script that uses this
  option:

      import tmp01suba
      import tmp01subb
      def test():
          tmp01suba.supermod.CurrentSubclassModule_ = tmp01suba
          roota = tmp01suba.parse('test01.xml', silence=True)
          tmp01subb.supermod.CurrentSubclassModule_ = tmp01subb
          rootb = tmp01subb.parse('test01.xml', silence=True)
          roota.show()
          print '-' * 50
          rootb.show()
      test()

# =========================================================

-- 

Dave Kuhlman
http://www.davekuhlman.org

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to