This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients fgracia, python-dev, roger.serwy, terry.reedy
Date 2012-05-28.03:08:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1338174535.82.0.776364556052.issue14929@psf.upfronthosting.co.za>
In-reply-to
Content
Interesting -- and nasty. I have used this successfully with both 3.2 and now 3.3 on Win7 to search idlelib/*.py files and on a directory of my own files, all written by Idle and been quite pleased with the speed.

I just tried searching /Lib/*.py for 'itertools' and quickly got 10 results (up to decimal.py) before Idle disappeared. OK, import idlelib/idle in console, repeat, and I get the same traceback up to

  File "C:\Programs\Python33\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 1877: character maps to <undefined>

This is not a problem on 2.7.

Patch fixes problem, so I committed it so it will be in 3.3.0a4 (in a few days).

The default extension is .py. The default encoding for .py files is utf-8. I think that is the default for what Idle writes. So I think this should be the default encoding (explicitly given) at least for .py files.
History
Date User Action Args
2012-05-28 03:08:55terry.reedysetrecipients: + terry.reedy, roger.serwy, python-dev, fgracia
2012-05-28 03:08:55terry.reedysetmessageid: <1338174535.82.0.776364556052.issue14929@psf.upfronthosting.co.za>
2012-05-28 03:08:55terry.reedylinkissue14929 messages
2012-05-28 03:08:54terry.reedycreate