473,563 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PYTHONDOCS

OK, I'm stupid. I have been unable to discern (even Googled) a way to set
the PYTHONDOCS variable to point to where the HTML files are. What to do? I
need to know the process and where theses variables are stored.
--
J. D. Leach
Columbus, Indiana USA

Linux/Open Source Computer using:
Mandrakelinux release 10.2 (Limited Edition 2005) for i586 kernel
2.6.11-6mdk

Dec 31 '05 #1
13 2422
J. D. Leach wrote:
OK, I'm stupid. I have been unable to discern (even Googled) a way to set
the PYTHONDOCS variable to point to where the HTML files are. What to do? I
need to know the process and where theses variables are stored.


It's an environment variable. In my case:

PYTHONDOCS=/usr/share/doc/python-docs-2.3.4/html

You need to locate the proper dir on your system, and then use your shell's
syntax for this (export/setenv for bash/tcsh).

cheers,

f

Jan 1 '06 #2
>>>>> "J" == J D Leach <jd*******@sbcg lobal.net> writes:

J> OK, I'm stupid. I have been unable to discern (even Googled) a
J> way to set the PYTHONDOCS variable to point to where the HTML
J> files are. What to do? I need to know the process and where
J> theses variables are stored. -- J. D. Leach Columbus, Indiana
J> USA

J> Linux/Open Source Computer using: Mandrakelinux release 10.2
J> (Limited Edition 2005) for i586 kernel 2.6.11-6mdk

J,
I'm stupider; I can't ATFQ for you.
But last night I stayed at a Holiday Inn Express, and can recommend

http://projects.edgewall.com/python-sidebar/

Which, assuming you've got connectivity, is teh shiznit.
HTH,
Chris
Jan 1 '06 #3
Chris Smith <sm************ *@bigfoot.com> writes:
>> "J" == J D Leach <jd*******@sbcg lobal.net> writes:

I'm stupider; I can't ATFQ for you.
But last night I stayed at a Holiday Inn Express, and can recommend

http://projects.edgewall.com/python-sidebar/

Which, assuming you've got connectivity, is teh shiznit.


Along the same lines, the OS X application launcher "Butler" comes
pre-configured with a "search python reference materials"
shortcut. I launch the shortcut, type in what I want,and hit enter,
and a browser window opens displaying the results of the
search. Adding other things - like searching the Python cookbook - is
relatively easy.

<mike
--
Mike Meyer <mw*@mired.or g> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Jan 1 '06 #4
Mike Meyer wrote:
Chris Smith <sm************ *@bigfoot.com> writes:
>>> "J" == J D Leach <jd*******@sbcg lobal.net> writes:

I'm stupider; I can't ATFQ for you.
But last night I stayed at a Holiday Inn Express, and can recommend

http://projects.edgewall.com/python-sidebar/

Which, assuming you've got connectivity, is teh shiznit.


Along the same lines, the OS X application launcher "Butler" comes
pre-configured with a "search python reference materials"
shortcut. I launch the shortcut, type in what I want,and hit enter,
and a browser window opens displaying the results of the
search. Adding other things - like searching the Python cookbook - is
relatively easy.

<mike


Thanks Mike for the link. I installed the sidebar and have found it to be an
invaluable aid in searching for info on Python. As for my problem with the
PYTHONDOCS variable, I still get the message about not having the
environment variable set. This is in spite of my setting the .bash profile
correctly. As it stands, I am at a loss for how to fix the problem. Using
the Mozilla sidebar, I found that the problem seems to involve several
OS's. However, the fixes suggested were the ones I have already applied.
Oh well, if I can't fix it, I'll just have to live with it.
--
J. D. Leach
Columbus, Indiana USA

Linux/Open Source Computer using:
Mandrakelinux release 10.2 (Limited Edition 2005) for i586 kernel
2.6.11-6mdk

Jan 2 '06 #5
On Mon, 02 Jan 2006 04:33:44 GMT,
"J. D. Leach" <jd*******@sbcg lobal.net> wrote:
... This is in spite of my setting the .bash profile correctly. As it
stands, I am at a loss for how to fix the problem ...


As a long shot, and I don't mean to insult anyone, but what is the name
of your .bash profile, and are you sure it's executing? My bash man
page mentions a lot of profile files, none of which is called ".bash";
bash seems to have a mind of its own when it comes to deciding which
profile files to read at which times; and it's not uncommon to set a
variable and not export it, which means that echo works but nothing else
does.

Regards,
Dan

--
Dan Sommers
<http://www.tombstoneze ro.net/dan/>
Jan 2 '06 #6
Dan Sommers wrote:
As a long shot, and I don't mean to insult anyone, but what is the name
of your .bash profile, and are you sure it's executing? My bash man
page mentions a lot of profile files, none of which is called ".bash";
bash seems to have a mind of its own when it comes to deciding which
profile files to read at which times; and it's not uncommon to set a
variable and not export it, which means that echo works but nothing else
does.

Regards,
Dan


Not insulted at all Dan, I used to think I was quite proficient at all
things digital in my youth, then age and numerous serious goofs and
oversights on my part humbled me. The profile doc in question is
named .bash_profile and now carries the following line:

PYTHONDOCS=/usr/share/doc/python-2.4/html; export PYTHONDOCS

To insure that my environment has indeed been altered, a quick command line
entry using env shows this to be the case:

....some entries
LANG=en_US
PYTHONSTARTUP=/etc/pythonrc.py
PYTHONDOCS=/usr/share/doc/python-2.4/html
LESSOPEN=|/usr/bin/lesspipe.sh %s
BROWSER=/usr/bin/www-browser
....more entries

The above is in accordance with all written documentation I have been able
to obtain, both within my local Python file directories, and those I've
found online. However, neither of my Python installations (2.4
in /usr/bin/, and 2.4.2 in /usr/local/bin/) recognize the existence of the
html docs. The following error from within the Python shell yields the same
result:

Python 2.4.2 (#1, Dec 25 2005, 23:06:12)
[GCC 3.4.3 (Mandrakelinux 10.2 3.4.3-7mdk)] on linux2
Type "help", "copyright" , "credits" or "license" for more information.
help('and')
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.

From the command line, if I enter:

[jdleach@deepgra y ~]$ pydoc if
The same error is raised. And this is where it gets really strange. If I
load pydoc from within eric3 (python IDE I use), I receive:

.... pydoc - the Python documentation tool
pydoc.py <name> ...
Show text documentation on something. <name> may be the name of a...
....more info

Then when I enter the os.environ.get( 'PYTHONDOCS') method, the following is
produced:
os.environ.get( 'PYTHONDOCS') '/usr/share/doc/python-2.4/html' help('if')


....Sorry, topic and keyword blah, blah, blah. No inline info
available...bla h, blah, bite me dolt...

I'm lost. Surely I've missed something simple.
Thank you for your time and sorry about the long post. I just wanted to
document in detail what is going on.

J. D. Leach
Jan 2 '06 #7
J. D. Leach wrote:
I'm lost. Surely I've missed something simple.


Maybe you can look in the source. "help" is an object defined by
site.py to be a "Helper" object from pydoc.py. Look in your Python lib
folder for pydoc.py and you should be able to trace through and find the
source of the problem. You can probably insert some print statements,
or maybe use "import pdb; pdb.set_trace" or some such approach.

-Peter

Jan 2 '06 #8
J. D. Leach wrote:
found online. However, neither of my Python installations (2.4
in /usr/bin/, and 2.4.2 in /usr/local/bin/) recognize the existence of the
html docs. The following error from within the Python shell yields the
same result: Then when I enter the os.environ.get( 'PYTHONDOCS') method, the following
is produced:
os.environ.get( 'PYTHONDOCS') '/usr/share/doc/python-2.4/html' help('if')
...Sorry, topic and keyword blah, blah, blah. No inline info
available...bla h, blah, bite me dolt...

I'm lost. Surely I've missed something simple.
Thank you for your time and sorry about the long post. I just wanted to
document in detail what is going on.

J. D. Leach


What do you get if you do
import pydoc
pydoc.help.docd ir

'/should/be/path/to/docs'

I believe there is a bug in the documentation-finding code. With the current
logic PYTHONDOCS will only be honoured if none of the following directories
exist:

$PYTHONHOME/lib
(sys.executable )/doc/lib
/usr/doc/python-docs-2.4.2/lib
/usr/doc/python-2.4.2/lib
/usr/doc/python-docs-2.4/lib
/usr/doc/python-2.4/lib
(sys.prefix)/Resources/English.lproj/Documentation/lib

I think (untested) the proper fix would be an extra break

--- pydoc.py 2006-01-02 18:54:04.870404 232 +0100
+++ pydoc1.py 2006-01-02 18:54:30.440516 984 +0100
@@ -1635,6 +1635,7 @@
os.path.join(sy s.prefix,
'Resources/English.lproj/Documentation')]:
if dir and os.path.isdir(o s.path.join(dir , 'lib')):
self.docdir = dir
+ break

def __repr__(self):
if inspect.stack()[1][3] == '?':

Consider filing a bug report.

Peter

Jan 2 '06 #9
Peter Otten wrote:
What do you get if you do
import pydoc
pydoc.help.docd ir '/should/be/path/to/docs'
The response is:
import pydoc
print pydoc.help.docd ir None


Obviously not there.

I believe there is a bug in the documentation-finding code. With the
current logic PYTHONDOCS will only be honoured if none of the following
directories exist:

$PYTHONHOME/lib
(sys.executable )/doc/lib
/usr/doc/python-docs-2.4.2/lib
/usr/doc/python-2.4.2/lib
/usr/doc/python-docs-2.4/lib
/usr/doc/python-2.4/lib
(sys.prefix)/Resources/English.lproj/Documentation/lib

I think (untested) the proper fix would be an extra break

--- pydoc.py 2006-01-02 18:54:04.870404 232 +0100
+++ pydoc1.py 2006-01-02 18:54:30.440516 984 +0100
@@ -1635,6 +1635,7 @@
os.path.join(sy s.prefix,
'Resources/English.lproj/Documentation')]:
if dir and os.path.isdir(o s.path.join(dir , 'lib')):
self.docdir = dir
+ break

def __repr__(self):
if inspect.stack()[1][3] == '?':

Consider filing a bug report.

Peter


I believe you are right, a bug report is probably warranted here.

--
J. D. Leach
Columbus, Indiana USA
Jan 2 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1431
by: Robert Hicks | last post by:
How do I set this variable in my .bash_profile? I have the html docs in /usr/local/PythonDocs. Thanks for any help... Robert
34
2897
by: nicolasfr | last post by:
Hi, I am a bit disapointed with the current Python online documentation. I have read many messages of people complaining about the documentation, it's lack of examples and the use of complicated sentences that you need to read 10 times before understanding what it means. That's why I have started a collaborative project to make a user...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7642
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1200
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.