Mercurial > libervia-backend
changeset 1114:7293233970ab
misc: stdout encoding management in python part of sat.sh
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 20 Aug 2014 23:42:58 +0200 (2014-08-20) |
parents | edd3fc4b4aaf |
children | b56374a1f6d6 |
files | src/sat.sh |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/sat.sh Wed Aug 20 23:07:59 2014 +0200 +++ b/src/sat.sh Wed Aug 20 23:42:58 2014 +0200 @@ -26,6 +26,10 @@ from ConfigParser import SafeConfigParser from os.path import expanduser, join import sys +import codecs +import locale + +sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout) fixLocalDir() # XXX: tmp update code, will be removed in the future @@ -41,11 +45,12 @@ env.append("PID_DIR='%s'" % join(expanduser(config.get('DEFAULT', 'pid_dir')),'')) env.append("LOG_DIR='%s'" % join(expanduser(config.get('DEFAULT', 'log_dir')),'')) +env.append("APP_NAME='%s'" % C.APP_NAME) env.append("APP_NAME_FILE='%s'" % C.APP_NAME_FILE) print ";".join(env) PYTHONEND ` -APP_NAME="Salut à Toi" # FIXME: the import from Python constants fails because of the à +APP_NAME="$APP_NAME" PID_FILE="$PID_DIR$APP_NAME_FILE.pid" LOG_FILE="$LOG_DIR$APP_NAME_FILE.log"