This is the mail archive of the mailing list for the Archer 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: source command for python scripts (was Re: Python pretty-printers and non-ASCII strings do not play well together :-()

On Wed, Nov 5, 2008 at 10:12 AM, Thiago Jung Bauermann
<> wrote:
> El mié, 05-11-2008 a las 10:05 -0800, Paul Pluzhnikov escribió:
>> On Wed, Nov 5, 2008 at 9:56 AM, Thiago Jung Bauermann
>> <> wrote:
>> > El mar, 04-11-2008 a las 11:28 -0800, Paul Pluzhnikov escribió:
>> >>   (gdb) python execfile('')
>> >
>> > I was wondering if it would be useful to have a command in GDB to source
>> > Python scripts, something like "source -p".
>> To tell the truth, I've just been using 'source', where the
>> first line of '' is
>>   python
>> I think it might be nice for "plain" 'source' to auto-deduce that
>> this is python source either by looking at ".py" extension, or
>> by scanning file contents for "obvious" python-ness.
> I liked the idea of looking at the extension. Also, another argument
> which I thought in favor of using a gdb command directly instead of
> python execfile is that it gives you tab completion.

The thing I like about using a gdb command directly is that it feels
better from a u/i perspective.  Having to use execfile seems way too
clumsy for something as important as finally having a real scripting
language built into gdb.

I vote for using the file extension, with -p (or some such) to handle
situations where the file extension isn't .py.

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