Newbie question - array module/fromlist method
Peter Hansen
peter at engcorp.com
Wed Feb 19 23:25:18 EST 2003
BrainDead wrote:
>
> I've found Python documentation and postings that state the 'fromlist'
> function is defined in the array module, HOWEVER, after doing an
> 'import array', I try the following line of code:
>
> myArray = array.fromlist(whatever)
>
> and I get an error message that python cannot find fromlist (actual
> error msg:
>
> AttributeError: 'module' object has no attribute 'fromlist').
>
> I'm sure it's something really lame I've done|haven't done, but I'll
> be damned if I can find it! Can someone throw a CLUE my way? Thanx in
> advance...
>
> PS In case you couldn't tell, this is the first time I've posted, so
> please excuse any violation of protocol.
Only "violation of protocol" might be not pasting in more of the real
error message. :-) There should have been a little traceback there
showing the failing line. Better yet, paste in the entire interactive
session where you did the "import array" and the error. You might
also type "array.__file__" while you're doing that so we can see what
it shows as well.
The array module had fromfile() since at least 1.5.2 so it's something
you're doing...
-Peter
More information about the Python-list
mailing list