LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-08-2011, 08:11 AM   #1
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Python documentation is in text format


I see that the Python documentation in /usr/share/doc/python-2.6.6/ is in text format. Is it possible to convert this documentation tree into HTML using any existing tools?

I ask because I wanted to avoid downloading the HTML documentation all over again if possible, since the documents are present in the distribution.

(I normally like to read the HTML documentation as it is nicer to browse through the different pages etc.)
 
Old 11-08-2011, 09:07 AM   #2
audriusk
Member
 
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 360

Rep: Reputation: 199Reputation: 199
As the documentation is actually in reStructuredText, Sphinx is what's used to generate HTML from it. I haven't used it for Python documentation myself (actually, haven't used it at all for quite some time now), so can't help you here with any detailed instructions, but it shouldn't be hard to use.

I too think HTML docs are nice to have, but I believe Pat omitted it due to size constraints.
 
1 members found this post helpful.
Old 11-08-2011, 09:18 AM   #3
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
@audriusk, thanks. I will check that page. If it is not possible to automate a build, it might be easier to download the Python documentation separately, or I might write a small Python script for this

EDIT: it appears that sphinx is already a script for automating builds. Just not sure how to get it to run on the Python documentation source tree.

Last edited by vharishankar; 11-08-2011 at 09:34 AM.
 
Old 11-08-2011, 09:34 AM   #4
audriusk
Member
 
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 360

Rep: Reputation: 199Reputation: 199
After a quick search I think these instructions should do the job. If instead of that you're going to download HTML docs, here's the location: http://python.org/ftp/python/doc/2.6.6/
 
Old 11-08-2011, 09:41 AM   #5
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Hi audriusk, I am sure the Python documentation writers use a custom script to build their documentation in HTML and other sources. These tools have no man pages, so it's a bit difficult to figure out how to specify the source path (whether each sub-directory should be treated as a separate source or not). Rather than experiment now, I think I'll leave it as a future project.

I tried googling on "how to generate python documentation from source" but most of these links end up in pydoc related pages.
 
Old 11-08-2011, 09:04 PM   #6
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by audriusk View Post
I too think HTML docs are nice to have, but I believe Pat omitted it due to size constraints.
Actually, the plain text docs without the hyperlinks are almost useless. I end up going to the python web page instead of attempting to use the bundled documentation. YMMV, but I'd much rather have the html.
 
Old 11-08-2011, 09:07 PM   #7
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178

Original Poster
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
I downloaded the HTML tar.gz from the python website and unpacked into /opt/

I like to read documentation offline myself.
 
Old 11-09-2011, 02:57 AM   #8
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,298
Blog Entries: 61

Rep: Reputation: Disabled
I'm a bit late with the information, but you could have got the Salix package here:
http://slackware.org.uk/salix/i486/13.37/salix/f/
 
1 members found this post helpful.
Old 11-09-2011, 02:19 PM   #9
rg3
Member
 
Registered: Jul 2007
Distribution: Fedora
Posts: 527

Rep: Reputation: Disabled
If you're only interested in the modules documentation, running "pydoc -p 8080" on a terminal and poiting your browser to http://localhost:8080/ could do the trick.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Python - How to get text file data into an array on python. golmschenk Programming 4 11-11-2013 09:15 AM
manipulating text in python suran Programming 4 11-30-2009 11:33 PM
A text editor written in python? will103 Programming 5 10-05-2008 06:47 AM
Python: Can you add text to an image in python? BrianK Programming 2 04-03-2008 03:56 PM
text format Jeebizz Slackware 4 11-09-2005 06:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration