"Prinn, Craig" <[email protected]> wrote in message news:[email protected]...
I am looking for a way to translate and ebcidic file to ascii. Is there a pre-existing library for this, or do I need to do this from scratch? If
> from scratch and ideas on where to start?

There are a couple of EBCDIC codecs (see list of codecs in http://docs.python.org/library/codecs.html).

Try:    open('file.txt').read().decode('ibm500').encode('ascii','replace')

You'll get '?' for chars ascii doesn't support.

-Mark



_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to