I am using Python 3.2.2 in Xcode 4.2 (build 4D199) on Mac OS X 10.7.2 and as follows:
main.py
#coding=utf-8
print("ľťď", 1+1)
print("ľťď")
Output in the console (Shift+Cmd+C):
('\xc4\xbe\xc5\xa5\xc4\x8f', 2)
ľťď
Expected output (e.g. IDLE works well):
ľťď 2
ľťď
Now given the fact that it also includes the brackets, apostrophes and comma, I presume that this behaviour is a result of the console’s debugging nature, hence the real question is probably how to make the console to show the final output. The behaviour however seems a bit inconsistent and since this is my first encounter with Xcode and Python, my question is rather broad.
TL;DR: Is it possible to make the Xcode’s console to output the same as e.g. IDLE?
It’s not. This is the difference between Python 2 and 3.
You’re actually running two different Python versions. Since Python 3 is not backwards compatible, you should pick either 2 or 3 for your project and stick with it.