Import no longer works in Python 2.3.x

Matt Whiteley matt at
Wed Feb 11 21:18:43 CET 2004

I have some python code in a directory called customModules and this sits
under the main directory which contains a piece of code. Under
2.1.x and 2.2.x, I did the following in :

import time, sys
sys.path += ['./customModules']

from requestHandler import inputHandler

and that allowed me to reference the requestHandler (stored in the
customModules directory) code without having to use
customModules.requestHandler every time. Under 2.3.x this doesn't work
anymore and I get a "ImportError: cannot import name inputHandler" error.
Can anyone shed some light on why this is and how I can get around it

Code that demonstrates this exact problem is at - running will work fine
under 2.2 but not under 2.3.

Many thanks
Matt Whiteley

More information about the Python-list mailing list