namespaces getting confusing
Mark Robinson
m.1.robinson at herts.ac.uk
Mon Sep 3 12:06:04 EDT 2001
can anyone explain why I get the following attribute error. I know it is
something to do with me misusing namespaces and imports but I dunno what.
%Motif.py
import param
def readSeq(filename)
#bla bla bla
#some other def's
#################
%param.py
import os, Motif
#various variable initialised
seq = Motif.readSeq
###############
%Camel.py
import os, Motif, param #and others
#other non relevant code
###########
I get the following error:
Traceback (most recent call last):
File "D:\blobby\param.py", line 1, in ?
import os, Motif
File "D:\blobby\Motif.py", line 1, in ?
import string, math, pickle, param
File "D:\blobby\param.py", line 30, in ?
seq = Motif.readSeq(filename)
AttributeError: 'Motif' module has no attribute 'readSeq'
More information about the Python-list
mailing list