mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-13 01:48:31 +02:00
Merge db820b74ba
into f9f20fb4ad
This commit is contained in:
commit
7ad212f078
1 changed files with 4 additions and 1 deletions
|
@ -54,12 +54,15 @@ def set_keychain(journal_name, password):
|
||||||
|
|
||||||
def u(s):
|
def u(s):
|
||||||
"""Mock unicode function for python 2 and 3 compatibility."""
|
"""Mock unicode function for python 2 and 3 compatibility."""
|
||||||
return s if PY3 or type(s) is unicode else unicode(s, "unicode_escape")
|
"""file paths with a U like uses directories in Windows where being interperted at Unicode so force converting to string"""
|
||||||
|
return s if PY3 or type(s) is unicode else unicode(s.encode('string-escape'), "unicode_escape")
|
||||||
|
|
||||||
def prompt(msg):
|
def prompt(msg):
|
||||||
"""Prints a message to the std err stream defined in util."""
|
"""Prints a message to the std err stream defined in util."""
|
||||||
if not msg.endswith("\n"):
|
if not msg.endswith("\n"):
|
||||||
msg += "\n"
|
msg += "\n"
|
||||||
|
print "barf"
|
||||||
|
print msg
|
||||||
STDERR.write(u(msg))
|
STDERR.write(u(msg))
|
||||||
|
|
||||||
def py23_input(msg):
|
def py23_input(msg):
|
||||||
|
|
Loading…
Add table
Reference in a new issue