Cau, vim, ze ti to jasny, ale neni lepsi se na to vykaslat a udelat virtualenv s py 2.7? Ty 2.6 jsou stejny verze? Neni mezi nima rozdil? Pokud je co pogrepovat changelogy?
s. --- In Perl you shoot yourself in the foot, but nobody can understand how you did it. Six months later, neither can you. | print 'aknerats'[::-1] 2013/10/23 Vladimir Macek <[email protected]>: > Zdravim, > > dodavam klientovi skript pro stazeni mailu z POP3, preformatovani a odeslani > pres SMTP. Touto metodou beru z puvodniho mailu textovou cast: > > def get_email_text(self, msg): > """ > get plaintext part of the message, or None if none > """ > get_charset = lambda msg: msg.get_content_charset() or msg.get_charset() > or 'ascii' > get_payload = lambda msg: unicode(msg.get_payload(decode=True), > get_charset(msg), 'replace') > > maintype = msg.get_content_maintype() > if maintype == 'multipart': > return u'\n'.join(get_payload(part) for part in > typed_subpart_iterator(msg, 'text', 'plain')) > elif maintype == 'text': > return get_payload(msg) > else: > return None > > > U me na Ubuntu 12.04.3 LTS s Python 2.7 i na Debian Squeeze s Python 2.6 se > maily zpracuji dobre. Zahlavi hlavni casti zdrojaku vysledneho mailu a dobre > kodovany vyraz "odlozeni trestniho oznameni": > > Content-Type: text/html; charset="utf-8" > MIME-Version: 1.0 > Content-Transfer-Encoding: quoted-printable > > odlo=C5=BEen=C3=AD trestn=C3=ADho ozn=C3=A1men=C3=AD > > > Nicmene u klienta na Ubuntu 10.04 LTS s Python 2.6 maji vsechny maily > diakritiku poskozenou, opet zahlavi s stejne slovo blbe kodovane: > > Content-Type: text/html; charset="utf-8" > MIME-Version: 1.0 > Content-Transfer-Encoding: quoted-printable > > odlo=17Een=ED trestn=EDho ozn=E1men=ED > > > Vim, ze 10.04 je dost stara verze, ale takhle zlobit? Zaslal mi vypis > promennych prostredi, nevidim tam nic podezreleho. > > Nesetkal se nekdo z vas s necim podobnym? > > Diky predem, > > Vlada > > > _______________________________________________ > Python mailing list > [email protected] > http://www.py.cz/mailman/listinfo/python _______________________________________________ Python mailing list [email protected] http://www.py.cz/mailman/listinfo/python
