Zdravim,
umel by jste mi nekdo vysvetlit proc mi volani exec(script2) hazi chybu 
(UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-1: 
character maps to <undefined>)? A jak to obejit.

#!/usr/bin/python
#-*- coding: utf8 -*-

def out(text):
    print text
    
s = u'Žlutý kun.'
script1 = "out(s)"
script2 = "out(u'Žlutý kun.')"

print s
exec(script1)
exec(script2)


Diky,
David
_______________________________________________
Python mailing list
Python@py.cz
http://www.py.cz/mailman/listinfo/python

Odpovedet emailem