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:
parent
f993fa07df
commit
5704cb4586
1 changed files with 67 additions and 31 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue