>>> import code >>> code.InteractiveConsole().interact() Python 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> 'あ' '\x82\xa0' >>> u'あ' u'\x82\xa0'