[FRPythoneers] New person's question
Jim.Vickroy at noaa.gov
Thu Jul 18 12:02:26 MDT 2002
Are you doing something like this?
--- start file igor_session.py ---------------
--- end file igor_session.py ----------------
--- start file t_igor_session.py -------------
import igor_session # assume igor_session is in a directory on your PYTHONPATH
session = igor_session.igor_session() # variable = module_name.class_name
--- end file t_igor_session.py -------------
The exception, your reported, may indicate that you were trying to call the module
(i.e., file) rather than a class within the file.
David Graham wrote:
> I am probably doing something stupid here. But I can make a class and
> run it from a script if the class and the script are in the same file.
> But when I seporate the class into it's own file, the file compiles ok,
> but I keep getting the following error.
> Traceback (most recent call last):
> File "./test_session.py", line 16, in ?
> session = igor_session()
> TypeError: object is not callable: <module 'igor_session' from
> What am i missing when I seporate the two into seporate files?
> David W. Graham
> Director of Geospatial Applications Development
> information integration and imaging, LLC
> 201 Linden St, Third Floor
> Fort Collins, CO 80524
> (970) 482-4400
> dgraham at i3.com
> This message sent by the FRPythoneers mailing list.
> Unsubscribe: echo unsubscribe | FRPythoneers-request at lists.community.tummy.com
> URL: http://lists.community.tummy.com/mailman/listinfo/frpythoneers
More information about the FRPythoneers