This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: source command for python scripts (was Re: Python pretty-printers and non-ASCII strings do not play well together :-()
- From: Paul Pluzhnikov <ppluzhnikov at google dot com>
- To: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- Cc: archer at sourceware dot org
- Date: Wed, 5 Nov 2008 10:05:06 -0800
- Subject: Re: source command for python scripts (was Re: Python pretty-printers and non-ASCII strings do not play well together :-()
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta;t=1225908310; bh=IpPwsv7wHKBvQlPNl0bpit9Cd3Y=;h=DomainKey-Signature:MIME-Version:In-Reply-To:References:Date: Message-ID:Subject:From:To:Cc:Content-Type: Content-Transfer-Encoding; b=yanCXWrhsK+wpIB49psGHaa1WX9OkrP28toDEDgmKFK2wO8TQxIHXCYQpSgl9Fb5IN/ebcb6np1q9YwygkGeOw==
- Domainkey-signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns;h=mime-version:in-reply-to:references:date:message-id:subject:from:to:cc:content-type:content-transfer-encoding;b=G7EugrqgMdNVbWN+Y3d1tL1dY4Z3LX/YxGPU2fAYCXDaUpXp7/POZHjMswhJpz5XXems791iE2TeQ6Uf7xpMPw==
- References: <20081104192834.32F4D3A6B0B@localhost> <1225907783.20764.60.camel@localhost.localdomain>
On Wed, Nov 5, 2008 at 9:56 AM, Thiago Jung Bauermann
<bauerman@br.ibm.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
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.
--
Paul Pluzhnikov