jp (blog/edit): editor arguments can now be specified on sat.conf, and default on are applied for known editors:

- vim and gvim will open content and metadata file in a splitted window
    - gvim use --nofork option
    - installed a workaround for shlex.split not handling unicode before Python 2.7.3
    - some fixes
This commit is contained in:
Goffi 2016-03-03 15:57:06 +01:00
commit 5704cb4586

View file

@ -38,6 +38,15 @@ from sat.core import exceptions
import sat_frontends.jp
from sat_frontends.jp.constants import Const as C
import xml.etree.ElementTree as ET # FIXME: used temporarily to manage XMLUI
import shlex
if sys.version_info < (2, 7, 3):
# XXX: shlex.split only handle unicode since python 2.7.3
# this is a workaround for older versions
old_split = shlex.split
new_split = (lambda s, *a, **kw: [t.decode('utf-8') for t in old_split(s.encode('utf-8'), *a, **kw)]
if isinstance(s, unicode) else old_split(s, *a, **kw))
shlex.split = new_split
try:
import progressbar