Re: controlling gdb via python's pexpect

George Russell
2009-11-06T09:11:07Z

fpga wrote:
> fpga wrote:
>
>> Can someone please give me an example of how this is done.
>> I'm afraid the documentation is not helping me.
>> Thx
>>
>>
>
> Thx George
> You've got further than I have!
> I tried to use subprocess before trying pexpect but failed.
> pexpect was suggested by experts on the python forum.
> Unfortuntely they appear incapable of correcting my trivial example of
> opening a terminal and sending the command 'gdb' to it.
> Any snippets most welcome.
> Looking at my repositories I see libdevel-gdb-perl.
> I like python's orderliness but have noticed that when python fails perl
> usually delivers.
>
See

http://www.dalkescientific.com/writings/diary/archive/2005/04/12/wrapping_command_line_programs.html
http://www.dalkescientific.com/writings/diary/archive/2005/04/15/wrapping_command_line_programs_II.html
http://www.dalkescientific.com/writings/diary/archive/2005/04/17/wrapping_command_line_programs_III.html
http://www.dalkescientific.com/writings/diary/archive/2005/04/18/wrapping_command_line_programs_IV.html
http://www.dalkescientific.com/writings/diary/archive/2005/04/18/wrapping_command_line_programs_V.html

for an assortment of tips on control of external processes from Python.

Cheers,
George