Skip to content

Commit

Permalink
Merge pull request #213 from DimitriPapadopoulos/python2
Browse files Browse the repository at this point in the history
Remove Python 2 leftovers
  • Loading branch information
sbesson authored Jan 27, 2025
2 parents 0937994 + 1fd0d95 commit e237a7c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
9 changes: 1 addition & 8 deletions xsd-fu/python/generateDS/generateDS.html
Original file line number Diff line number Diff line change
Expand Up @@ -2068,7 +2068,7 @@ <h2><a class="toc-backref" href="#id68">13.1&nbsp;&nbsp;&nbsp;Capturing xs:date
<p>Then, define <tt class="docutils literal"><span class="pre">date_calcs.py</span></tt> as:</p>
<pre class="literal-block">
#!/usr/bin/env python
# -*- mode: pymode; coding: utf-8; -*-
# -*- mode: pymode; -*-

import datetime

Expand Down Expand Up @@ -2147,13 +2147,6 @@ <h1><a class="toc-backref" href="#id72">15&nbsp;&nbsp;&nbsp;Includes -- The XML
script scans your XML Schema document and, recursively, documents
that are included looking for <tt class="docutils literal"><span class="pre">include</span></tt> elements; it inserts all
content into a single document, which it writes out.</p>
<p>Since <tt class="docutils literal"><span class="pre">process_includes.py</span></tt> uses the ElementTree API, in order
to use <tt class="docutils literal"><span class="pre">process_includes.py</span></tt> you will need one of the following:</p>
<ul class="simple">
<li>Python 2.5 -- ElementTree is in the Python-2.5 distribution. Or,</li>
<li><a class="reference external" href="http://effbot.org/zone/element-index.htm">ElementTree</a>. Or,</li>
<li><a class="reference external" href="http://codespeak.net/lxml/">lxml</a> -- another implementation of the ElementTree API.</li>
</ul>
<p>Here are samples of how you might use <tt class="docutils literal"><span class="pre">process_includes.py</span></tt>, if
your schema contains <tt class="docutils literal"><span class="pre">include</span></tt> elements.</p>
<p>Example 1:</p>
Expand Down
6 changes: 1 addition & 5 deletions xsd-fu/python/generateDS/generateDS.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@



#from __future__ import generators # only needed for Python 2.2



import sys
import os.path
import time
Expand Down Expand Up @@ -905,7 +901,7 @@ def getKeys(self):
def add(self, name, attr):
self.group[name] = attr
def delete(self, name):
if has_key(self.group, name):
if name in self.group:
del self.group[name]
return 1
else:
Expand Down
2 changes: 1 addition & 1 deletion xsd-fu/python/generateDS/process_includes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# -*- mode: pymode; coding: utf-8; -*-
# -*- mode: pymode; -*-
"""
Synopsis:
Recursively process the include elements in an XML Schema file.
Expand Down

0 comments on commit e237a7c

Please sign in to comment.