Skip to content

Commit

Permalink
Update some parts of the documentation
Browse files Browse the repository at this point in the history
Re: #337.

- Update the Natlink engine page vis-à-vis Python 2.7.
- Clean up one question and answer on the FAQ page.
  • Loading branch information
drmfinlay committed Sep 4, 2022
1 parent af7957f commit 4c3c928
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
15 changes: 7 additions & 8 deletions documentation/faq.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ See the :ref:`changelog <RefChangelog>` for the full list of changes between
the two versions.


How can I use older Dragonfly scripts with Dragonfly2?
How can I use older Dragonfly scripts written for Python 2.7?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This version of Dragonfly has been written with backwards-compatibility in
Expand All @@ -118,16 +118,16 @@ this support is, at present, neither difficult nor detrimental to the
library's support for Python version 3. The Kaldi engine back-end is the
one (optional) component of Dragonfly that requires Python version 3.

To use older Python 2 code with Python 3, it first needs to be converted.
The following two command-line programs may be used to this end:
If the reader must use Python 3, then the Python 2 code typically needs to
be converted. The following two command-line programs may be used to this
end:

* `2to3`_ - reads Python 2 source code and applies a series of fixers to
transform it into valid Python 3 code.
* `python-modernize`_ - uses *2to3* to make Python 2 code compatible with
Python 3.

You may be interested in the `Python 2-3 code porting guide`_ if you prefer
to do things manually.
The `Python 2-3 code porting guide`_ may also be of interest.

A number of older Dragonfly command modules also include the following code:

Expand All @@ -139,9 +139,8 @@ A number of older Dragonfly command modules also include the following code:
except ImportError:
pass

Since the distribution name has been changed to *dragonfly2*, you will need
to either replace :code:`dragonfly` with :code:`dragonfly2` or remove code
like this altogether.
Since the distribution name has been changed to *dragonfly2*,
:code:`dragonfly` will need to be replaced with :code:`dragonfly2`.


Where are some good resources on learning Python?
Expand Down
8 changes: 4 additions & 4 deletions documentation/natlink_engine.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Dragonfly and Natlink support Dragon versions up to 15 (latest). The
*Individual* editions of *Dragon* are recommended, although other editions
such as *Home* will also work.

Python version 2.7 (32-bit) is required to use this engine back-end, at
least for the moment. Support for this version is not maintained for the
other engine back-ends and will be **dropped completely** in the first
*MAJOR* release following stable Natlink support for Python 3.
Python version 2.7 (32-bit) is required to use this engine back-end. This
is because, at the time of writing (September '22), Natlink does not have
stable support for Python version 3. Dragonfly will continue to retain
support for Python version 2.7 regardless, since it is not difficult.

Once Natlink is up and running, Dragonfly command-modules can be
treated as any other Natlink macro files. Natlink automatically
Expand Down

0 comments on commit 4c3c928

Please sign in to comment.