I accidently created the file __INIT__.PY in my 'krw'
package directory (WinNT4). Everything appeared to
work as it should, except I was getting a very strange
AttributeError:
Python 2.1 (#15, Apr 16 2001, 18:25:49) [MSC 32 bit
(Intel)] on win32
Type "copyright", "credits" or "license" for more
information.
>>> import printerTable
>>> l = printerTable.buildFromServer( 'chachaptr1')
>>> l = printerTable.buildFromServer( 'chachaptr1')
>>> l = printerTable.buildFromServer( 'chachaptr1')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "printerTable.py", line 57, in buildFromServer
host = krw.util.Host( hostAndPort[0])
AttributeError: '?' module has no attribute 'util'
At this point:
dir( printerTable.krw) => []
After 2 days trying to find out what was happening in
the code, I decided to check out the package. I ended
up recreating the file as __init__.py and the problem
went away.
I can rename the file back to __INIT__.PY and it
produces the behavior mentioned above.
|