RFC: add ability to "source" Python code
Paul Pluzhnikov
ppluzhnikov@google.com
Wed Feb 11 02:25:00 GMT 2009
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
More information about the Gdb-patches
mailing list