An editor for ReStructured Text
I have recently added an editor for ReStructured Text to ETS. As you can see in the screenshots below, the editor is largely composed of two panes, with the left pane containing an editor for the RST and the right pane displaying that RST as HTML. The HTML preview can be generated by vanilla docutils or by Sphinx, and this is configurable within the application.
The HTML preview is updated live as you type. Because all RST processing occurs in a separate helper process, the application remains snappy even when editing large documents.
Both the Qt4 and the wxWidgets backends of Traits UI are supported.
Note: The editor requires the latest trunk versions of Traits and Traits UI. For more information on running the application, please see the readme file.
Edit: With the recent release of ETS 3.3.0, the trunk version of ETS is no longer required to use the editor, as it is included in that release. That being said, if you update the editor to its latest trunk version, you must also update Traits, TraitsGUI, and TraitsBackendWx/TraitsBackendQt to their latest trunk versions.


Awesome, I’m looking forward to using it some day in the future
Comment on July 14, 2009 @ 6:11 pm
Is there any application (or demo application) that uses this in the ETS tree? EPDLab, anyone?
Comment on July 14, 2009 @ 6:16 pm
If you run app.py (AppTools/enthought/rst/app.py), it opens up the app. There is a file browser, from there you can open up whatever app you want.
[edit] – I mean “…whatever ReST file you want”
Comment on July 15, 2009 @ 11:35 am
I think you wanted:
DEFAULT_STATIC_PATH = os.path.abspath(os.path.dirname(__file__)) + ‘/sphinx_default’
I.e. you want absolute path, dirname gives you relative path (depending where you run it).
Thanks for the hack btw, I’m integrating the “sphinx view” based on this code on leo-editor as well.
Comment on July 15, 2009 @ 12:28 pm
Can we hope this wonderull tool be an independant tool one day ? I’ve “Standard Python 2.5″ actually installed, and I don’t want to mess it with another distro. Or i’m missing something and I can easly install “ETS Python” side “Standard Python 2.5″ ?
I’ve think about such a tool since more than 3 year… Great work !!!
Comment on July 15, 2009 @ 2:58 pm
@StepH: ETS is not a python distribution. You can install it into any python environment as long as you meet the pre-reqs (VTK, PyQT/wxPython, NumPy, SciPy for a full ETS install).
BTW, I don’t think you need a full install to use this tool. But I haven’t tried to figure out what the minimum install is. If you’re a user of setuptools, you could try the following now that this has been released:
easy_install -U AppTools[nonets]
This should install all necessary Python projects to get the ReST editor to run. The gotcha will be if there are non-Python projects needed, this won’t get them automatically. I’m talking about wx, Qt, etc.
Comment on July 16, 2009 @ 3:31 pm
@Ville: Thanks for pointing that out. I’ve updated the editor in the trunk to make sure that DEFAULT_STATIC_PATH is absolute.
Comment on July 17, 2009 @ 10:02 am
@StepH: The non-ETS dependencies for the editor are:
* ConfigObj
* multiprocessing (standard library in Python 2.6, downloadable as a backport for Python 2.5)
* Either Qt 4.4+ or wxPython
Comment on July 17, 2009 @ 10:10 am
finally, kiva gradients!! Yes!! Going to go and play around with it.
You guys are doing a good job.
Comment on July 20, 2009 @ 8:50 am
Would you be so kind to give the exact instructions to install and make it work (with dependencies) on a clean Debian 5 install?
I am a Linux newbie willing to learn fast!
Comment on August 20, 2009 @ 4:25 am
@Marc, your best bet is to ask on the enthought-dev mail list. I know there are deb packages of ETS, and there are probably deb packages of the latest ETS release which includes this, but I am not positive.
Comment on August 20, 2009 @ 5:18 pm
@Bryce. I did but no response yet. I would like to have a deb package of the latest release that has the RST application in it. Please help!
Comment on August 26, 2009 @ 12:45 pm
@Marc, looks like python-apptools in Debian sid has it.
Comment on August 26, 2009 @ 6:21 pm
These steps worked for me on Ubuntu 9.04:
sudo apt-get updatesudo apt-get install python-setuptools python-vtk
sudo easy_install -U numpy
sudo easy_install -U docutils sphinx TraitsBackendQt[nonets] AppTools[nonets]
… more details
Comment on August 28, 2009 @ 3:22 pm
My ReStructured textfiles are all named .txt. Apparently I have to rename them all to .rst to use your editor? I just followed the guidelines of the inventors and implementers of ReStructured text who suggest just .txt as an extension for ReStructured text files. In any case you really ought to allow people to use whatever extension they like. Don’t you think?
Comment on August 29, 2009 @ 8:19 pm
I posted a comment questioning the seeming inability of editing files without a .rst extension using this editor, hoping to be told that I’d missed the obvious… that there was a simple way to allow the editor to open a file with an .txt or other extension.
Instead I find my comment deleted!
Ok… I’ve obviously stumbled into hostile territory. Sorry I followed up on this at all.
Comment on August 30, 2009 @ 9:17 am
The comment wasn’t deleted, just sitting in the queue to be approved. First time posters have to get approval. You wouldn’t believe the amount and variety of spam we get.
I believe the RST editor does indeed expect ‘.rst’ files, though I’ll add ‘.txt’ files today.
Comment on August 31, 2009 @ 11:11 am
Bryce did check-in a fix so that you can now open .txt files.
Comment on September 1, 2009 @ 12:23 pm
[...] tell, there isn’t a WYSIWYG editor for either that is still being maintained. (Update: there may be one for reST: I’d welcome input from anyone who has used [...]
Pingback on March 30, 2010 @ 2:33 pm
[...] tell, there isn’t a WYSIWYG editor for either that is still being maintained. (Update: there may be one for reST: I’d welcome input from anyone who has used [...]
Pingback on April 23, 2010 @ 11:07 am