On 2 October 2012 19:27, Tino Dai <[email protected]> wrote:
> On Tue, Oct 2, 2012 at 2:20 PM, Tino Dai <[email protected]> wrote:
>>>> and the get_class class works sometime for finding modules within a
>>>> certain directory. If the get_class
>>>> doesn't work, it throws an AttributeError.
>>>
>>> I don't really understand what you mean by this. Can you copy and
>>> paste the actual error message (all of it)?
>>>
>>>>
>>>> The module exists in the directory, and I'm trying to debug this. Does
>>>> anybody have any hints to go about debug
>>>> this?
>>>
>>
>> get_class('etl.transfers.bill_subject') #
>> etl.transfers.bill_subject does exist under the transfers directory
>> <module 'etl.transfers.bill_subject' from
>> './leg_apps/etl/transfers/bill_subject.pyc'>
It shouldn't be returning a module. Is there a class in the
bill_subject module that you wanted to get? What happens if you do:
get_class('etl.transfers.bill_subject.BillSubject')
where BillSubject is the name of the class in the module.
Oscar
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor