An editor for ReStructured Text

安裝

(請先切換成 root) 以下 script 以 ArchLinux 為例(ArchLinux 已經預設是 python3,所以以下必須用 python2):

#!/bin/sh
svn co https://svn.enthought.com/svn/enthought/EnthoughtBase/trunk EnthoughtBase
svn co https://svn.enthought.com/svn/enthought/Traits/trunk Traits
svn co https://svn.enthought.com/svn/enthought/TraitsGUI/trunk TraitsGUI
svn co https://svn.enthought.com/svn/enthought/TraitsBackendQt/trunk TraitsBackendQt
svn co https://svn.enthought.com/svn/enthought/Rested/trunk/enthought/rst/ RestEditor

cd EnthoughtBase
python2 setup.py install bdist_egg
cd ../Traits
python2 setup.py install bdist_egg
cd ../TraitsGUI
python2 setup.py install bdist_egg
cd ../TraitsBackendQt
python2 setup.py install bdist_egg
cd ..

easy_install-2.7 -f dist/ -H dist/ EnthoughtBase Traits TraitsGUI TraitsBackendQt
easy_install-2.7 configobj pygments docutils sphinx rst2pdf

pacman -S python2-numpy
yaourt -S pyqt-dev

開始使用

$ cd RestEditor
$ python2 app.py

如果你遇到中文問題

修改 /usr/lib/python2/site-packages/Traits-3.5.1.dev_r26218-py2.7-linux-i686.egg/enthought/traits/ui/editor.py

在出錯的行數修改成類似這樣(請去除參考行數):

285         try:
286             _value = unicode( value.decode('utf-8') )
287         except UnicodeEncodeError:
288             _value = unicode( value )
289
290         return _value

內容目錄

上一個主題

發佈 package 到 PyPI

下一個主題

Others

本頁