I have been having lots of trouble with encondings in python. While searching the net for answers, I have come upon many replies, but none of them actually worked. Then, I found out this behaviour: running the commands in the python interpreter behaves different from actually running the script. See:
$ cat prueba.py
print("{} con leche".format('Café'))
$ python prueba.py
File "prueba.py", line 1
SyntaxError: Non-ASCII character '\xc3' in file prueba.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
$ python
Python 2.7.12+ (default, Sep 1 2016, 20:27:38)
[GCC 6.2.0 20160927] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print("{} con leche".format('Café'))
Café con leche
>>>
Can anyone explain this to me? (and, if possible, also help me with the encoding problem)