This is the mail archive of the
mailing list for the Archer project.
Re: source command for python scripts (was Re: Pythonpretty-printers and non-ASCII strings do not play well together :-()
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
> <email@example.com> wrote:
> > El mar, 04-11-2008 a las 11:28 -0800, Paul Pluzhnikov escribiÃ:
> >> (gdb) python execfile('simple.py')
> > I was wondering if it would be useful to have a command in GDB to source
> > Python scripts, something like "source -p foo.py".
> To tell the truth, I've just been using 'source foo.py', where the
> first line of 'foo.py' is
> 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.
Thiago Jung Bauermann
IBM Linux Technology Center