Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Source code as text/plain

36 views
Skip to first unread message

Carlos Nepomuceno

unread,
May 24, 2013, 11:59:52 PM5/24/13
to pytho...@python.org
I'd like to have the option to download the source code as text/plain from the docs.python.org pages.

For example: when I'm a docs page, such as:

http://docs.python.org/2/library/string.html

and I click the source code link I'm taken to a Mercurial page:

http://hg.python.org/cpython/file/2.7/Lib/string.py

but over there there's no way to get a clean text/plain version of the code because the line numbers are included.

A link to the text/plain version on that page would be nice!

Chris Rebert

unread,
May 25, 2013, 12:06:05 AM5/25/13
to Carlos Nepomuceno, Python

It's already there. Click the "raw" link in the sidebar. In this case, at this moment, it sends you to
http://hg.python.org/cpython/raw-file/f4981d8eb401/Lib/string.py

Carlos Nepomuceno

unread,
May 25, 2013, 12:12:05 AM5/25/13
to pytho...@python.org
Oh great! Thank you!

________________________________
> Date: Fri, 24 May 2013 21:06:05 -0700
> Subject: Re: Source code as text/plain
> From: cl...@rebertia.com
> To: carlosne...@outlook.com
> CC: pytho...@python.org

>
>
> On May 24, 2013 9:02 PM, "Carlos Nepomuceno"

> <carlosne...@outlook.com<mailto:carlosne...@outlook.com>>

> wrote:
> >
> > I'd like to have the option to download the source code as text/plain

> from the docs.python.org<http://docs.python.org> pages.

Anssi Saari

unread,
May 28, 2013, 9:31:33 AM5/28/13
to
The 'raw' link on the left spews the source as application/binary so
most likely your browser will download it instead of showing it. Which
is what you asked but if you wanted to view in browser sans the line
numbers, there doesn't seem to be a way.

Carlos Nepomuceno

unread,
Jun 3, 2013, 6:34:57 PM6/3/13
to pytho...@python.org
----------------------------------------
> Date: Mon, 3 Jun 2013 09:06:46 +1000
> From: c...@zip.com.au
> To: cl...@rebertia.com
[...]
> http://hg.python.org/cpython/raw-file/tip/Lib/string.py

What's the 'tip' tag?

Andreas Perstinger

unread,
Jun 4, 2013, 11:51:08 AM6/4/13
to pytho...@python.org

Carlos Nepomuceno

unread,
Jun 4, 2013, 2:34:03 PM6/4/13
to pytho...@python.org
Thank you!

> Date: Tue, 4 Jun 2013 17:51:08 +0200
> From: andip...@gmail.com
> To: pytho...@python.org

> Subject: Re: Source code as text/plain
>
0 new messages