<!--/*SC*/DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"/*EC*/-->
<html><head><title></title><style type="text/css"><!--body{padding:1ex;margin:0px;font-family:sans-serif;font-size:small;}a[href]{color:-moz-hyperlinktext !important;text-decoration:-moz-anchor-decoration;}blockquote{margin:0;border-left:2px solid #144fae;padding-left:1em;}blockquote blockquote{border-color:#006312;}blockquote blockquote blockquote{border-color:#540000;}--></style></head><body><div style="font-family: Arial; font-size: medium;" dir="ltr"><div>Python 2.7 or higher: Looking for reasons/scenarios where one should use the codecs vs. io module.</div>
<div> </div>
<div>Are there use cases that favor one specific module over the other module?</div>
<div> </div>
<div>My understanding is that the io module is much faster than the codecs module (and can be used interchangably), but the codecs module provides backward compatibility if you need to target versions of Python less than 2.6.</div>
<div> </div>
<div>Thank you,</div>
<div>Malcolm</div></div></body></html>