[Python-ideas] pep 397
rosuav at gmail.com
Thu Jan 1 14:27:18 CET 2015
On Thu, Jan 1, 2015 at 11:47 PM, Liam Marsh <liam.marsh.home at gmail.com> wrote:
> "I suspect you don't
> need any changes to the language to make this work"
> - you are right, this problem does not affect the language itself, but the
> idlelib library....
> - I was thinking of an "pyidle" executable next to the "py" and "pyw"
> I am also trying to create a small script to do this...
A small script ought to be able to handle it. All it needs to do is:
1) Read in the first line of the file.
2) See if it can be parsed according to PEP 397
3) Invoke IDLE.
Since this is primarily for your own personal use, rather than being a
part of the language or standard library, you could make a few
assumptions - for instance, assume an ASCII-compatible file encoding,
assume that it won't get any arguments other than the script to open,
anything else that'll make your life easier. Knock something together,
and if you have trouble with the details, python-list will undoubtedly
be willing to help out.
All the best!
More information about the Python-ideas