diff options
| author | Tomaz Solc <tomaz.solc@tablix.org> | 2015-05-14 12:35:42 +0200 |
|---|---|---|
| committer | Tomaz Solc <tomaz.solc@tablix.org> | 2015-05-14 12:35:42 +0200 |
| commit | 26e53a3e86245caa05e0d5a150764589892a90ba (patch) | |
| tree | ad17c472085945d529717e60991d2fb76618d2e9 /unidecode/util.py | |
| parent | 87ec07b688b0b2a22a8b120a093b30e63e9e48be (diff) | |
| download | unidecode-26e53a3e86245caa05e0d5a150764589892a90ba.tar.gz | |
Add a newline if the string comes from commandline
Diffstat (limited to 'unidecode/util.py')
| -rw-r--r-- | unidecode/util.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/unidecode/util.py b/unidecode/util.py index b608c7e..477280d 100644 --- a/unidecode/util.py +++ b/unidecode/util.py @@ -40,6 +40,10 @@ def main(): stream = os.fsencode(options.text) else: stream = options.text + # add a newline to the string if it comes from the + # command line so that the result is printed nicely + # on the console. + stream += '\n'.encode('ascii') else: if PY3: stream = sys.stdin.buffer.read() |
