[Tutor] new to linux and I cannot find some python things

Brian van den Broek broek at cc.umanitoba.ca
Thu Dec 29 00:58:24 CET 2005


Simon Gerber said unto the world upon 28/12/05 05:12 PM:
>>Hi all,
>>
>>I'm a week or so into having switched from WinXP to linux (ubuntu
>>breezy). There is a lot to learn about the differences in the OS'es
>>and that's just fine.
> 
> 
> Excellent! Another Ubuntu Breezy user here. If there's anything Ubuntu
> I can help you with, drop me an e-mail and I'll do what I can to help.

Hi Simon,

thanks for the reply and the offer :-)

>>But, a couple of things have been in my way with Python. Most notably,
>>  I don't know how one browses the documentation. On Windows, I just
>>fired up the .chm (I think cmh--at any rate, the compiled help file.)
> 
> 
> Yeah, chm. Incidentally, there's a chm reader for Linux. Very
> primative, but it works in a pinch. Look for 'xchm' in the Universe
> repository.

Thanks. A bit part of the difficulty in the transition is suddenly I 
don't know what program to use for what. Pointers help :-)

> 
>>I have installed the docs on the linux side and they can be found by
>>python:
>>
>> >>> help()
>><snip welcome msg>
>>help> NONE
> 
> 
> Nah, that's part of core Python. Nothing to do with the 'python-doc'
> package you installed.

I beg to differ :-)

Before I installed I got this:

IDLE 1.1.2
 >>> help()

Welcome to Python 2.4!  This is the online help utility.

<snip basic interactive help instructions which include doing help 
topics for a list of available choices>

help> topics

Here is a list of available topics.  Enter any topic name to get more 
help.

ASSERTION           DELETION            LOOPING             SEQUENCES

<snip list>

help> ASSERTION

Sorry, topic and keyword documentation is not available because the Python
HTML documentation files could not be found.  If you have installed them,
please set the environment variable PYTHONDOCS to indicate their location.

On Debian GNU/{Linux,Hurd} systems you have to install the corresponding
pythonX.Y-doc package, i.e. python2.3-doc.

help>


On windows, one has to download the html version of the documentation 
and point the PYDOCS (or something close) env. variable at them. On 
ubuntu, once I installed python2.4-doc, it worked as shown in my OP. 
(I did test by removing the python2.4-doc package to get the behaviour 
shown in this post, then reinstalling to get the original behaviour.)

>>I assume there is some linux facility for documentation browsing that
>>beats importing modules and accessing docstrings. I'd work it out
>>eventually, but a timesaving pointer would be appreciated.
> 
> 
> Firefox!
> 
> file:///usr/share/doc/python2.4/html/index.html

But shouldn't it be harder than that? :-)

> The python-doc package is just an offline version of
> http://www.python.org/doc/2.4.2/
> 
> You can also probably find a copy of the book 'Dive into Python' here:
> file:///usr/share/doc/diveintopython/html/index.html
> 
> I know Hoary installed it by default. Not sure about Breezy, since I
> just did a dist-upgrade from Hoary.

Yep, it was installed by default. I'd wondered where it lived. But, 
since I've the dead-tree version, I didn't get motivated enough to 
find out. Still, thanks.

> As a rule, with Ubuntu (and most other Linux distros), the
> documentation goes under /usr/share/doc/<whatever>. But you can always
> check to see exactly what a package has put where. From the
> command-line, just type 'dpkg -L python-doc'.
> 
> Hope that helps,

Thanks, it did. Especially that last bit. I've been learnign the 
various shell commands almost as quickly as I've been finding I want 
to know what command does foo.

Thanks muchly,

Brian vdB


More information about the Tutor mailing list