This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: add ability to "source" Python code


On Tue, Feb 10, 2009 at 9:02 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:
>
> Thiago> I've never written a Python script (in GDB or otherwise) with that
> Thiago> markup, but *all* the Python scripts I ever wrote in my life ended
> Thiago> in .py. It'd be just counter-intuitive and counter productive to not
> Thiago> support the filename extension.
>
> Yes, I agree.
>
> However, due to the controversy, I'm withdrawing this patch.  I guess
> users can use "python execfile".

I'd like to push for this patch a little harder...

It is true, users could just type:

  python execfile("/path/to/script.py")

(and loose file-name completion) instead of

  source /path/to/script.py

or prefix each one of their foo.py scripts with "python", but why
make them?

It seems to me that we are trading end-user convenience (after all,
you put this patch in because it was convenient for us all to use
"source" like that!) for largely theoretical backwards compatibility
problem.

-- 
Paul Pluzhnikov


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]