[Python-ideas] pep 397

Wolfgang Maier wolfgang.maier at biologie.uni-freiburg.de
Thu Jan 15 15:31:31 CET 2015

On 01.01.2015 14:27, Chris Angelico wrote:
> 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"
>> executables.
>>   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.

Yes and no. It is certainly doable, but it also means coding things 
twice since the functionality already exists in the launcher.

What would be good is if the launcher had an additional flag telling it 
to not actually start python, but just report the path to it, something 

$ py --dry-run my_script


More information about the Python-ideas mailing list