write userConsoleMessage to settings dir
@@ -33,6 +33,7 @@ import pstats
import cPickle as pickle
import curses
import locale
+import io
import StringIO
import time
import traceback
@@ -44,7 +45,7 @@ def userMessage(*args):
if not userConsoleMessage:
userConsoleMessage = ''
args = [str(i) for i in args]
- userConsoleMessage += ' '.join(args) + '\n'
+ userConsoleMessage += unicode(' '.join(args) + '\n')
class CiProgram:
@@ -698,6 +699,10 @@ def run_ci():
print '\033[?2004l'
global userConsoleMessage
if userConsoleMessage:
+ fullPath = os.path.expanduser(os.path.expandvars(
+ '~/.ci_edit/userConsoleMessage'))
+ with io.open(fullPath, 'w+') as f:
+ f.write(userConsoleMessage)
print userConsoleMessage
if __name__ == '__main__':
