473,385 Members | 1,587 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Authoritative documentation on packages, import & ihooks

I am looking for information on packages & import hooks, including
simple examples on how to implement a simple import hook. Quick
googling turns out some documents, such as:

-- PEP 302:
http://www.python.org/peps/pep-0302.html

-- What's new on Python 2.3:
http://www.python.org/doc/2.3.4/what...on-pep302.html

-- Import SIG:
http://www.python.org/sigs/import-sig/

-- PyDoc for the ihooks module:
http://pydoc.org/2.3/ihooks.html

However, after reading them, I ended up more confused than before.
There are lots of references to the ihooks standard module, but there
is no documentation about it on the standard Python docs. The "Modules
That Needs Docs" Wiki entry
(http://www.python.org/moin/ModulesThatNeedDocs) lists ihooks and
imputils, but noone has volunteered to do it yet (worse, not even a
bug report was filled; this is something that I'm going to do).
Packages are also not documented (there is still a reference to an
essay from 1.5 days on the Python 2.3 docs). It's a messy state of
affairs.

For what I could see, the import system went over several iterations
and patches since the 1.5 release (when packages were added). It's now
hard to understand what is the preferred hooking mechanism as far as
Python 2.4 (and future versions) are concerned. For this reason, I
would like to know if there is any document which may be considered
"authoritative" for the import system (besides ihooks.py and
import.c). If *all* that exists is the source code, well, I guess I'll
have to read it. But anyway... pointers to simple examples also are
helpful. Thanks in advance.

--
Carlos Ribeiro
Consultoria em Projetos
blog: http://rascunhosrotos.blogspot.com
blog: http://pythonnotes.blogspot.com
mail: ca********@gmail.com
mail: ca********@yahoo.com
Jul 18 '05 #1
0 1148

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

Similar topics

5
by: Petri Savolainen | last post by:
I was trying to roll my own python code importer, but in the end, it seems that no matter what you try, it is always necessary to supply a REAL file object for python lower-level import machinery...
3
by: Chris Barker | last post by:
Hi all, We've been having a discussion over on the wxPython-users mailing list about how to deal with multiple versions of wxPython. During the discussion it came up that this isn't a problem...
8
by: Grant D. Watson | last post by:
If this has been answered before, or if my terminology is off, please bear with me; my Python experience is limited to use in one class and to personal projects. I'd like to do something rather...
2
by: Peter Saffrey | last post by:
(apologies for starting a new thread - Google can't retrieve the other message for some reason) Yes, /usr/lib/python/site-packages is in sys.path. This series of commands should explain what I...
0
by: Amit Khemka | last post by:
Hello All, I have multiple modules with same name in different directories (well I guess thats may not be a good practise, but i needed it for debugging and working with various versions). Now...
1
by: Clarence | last post by:
It appears that the -W option on starting python doesn't work the same as the warnings module. In particular, the "message" parameter is not treated as a regular expression, but rather a string...
3
by: yinglcs | last post by:
Hi, i have 2 python files in *different directory* , how can I import python functions from 1 python file to another? i get this error: import task ImportError: No module named task/ Thank...
3
by: Doug Robinson | last post by:
If I try to access another jar files default package I have no problem. When I try to access anythig else i.e. package com.mine.thing, I always get the not found message. What special thing do I...
5
by: ManWithNoName | last post by:
Hi! I'm somewhat new to python (using 2.5 on w2k) Currently I am trying to organize a structure for a project, and import all necessary files and so on. Everything went fine until I tried...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.