Re: How to get all variables of some module in that module

2008-10-21 Thread Alex Gusarov
Steven, Peter, thanks a lot from a Python newcomer. Problem solved with you help. Still, Python community is best I ever met :) -- Best regards, Alex -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get all variables of some module in that module

2008-10-21 Thread Peter Otten
Alex Gusarov wrote: > Hello, I have a following module and in its end I want to initalize > collection of tables: > > Module: > > from sqlalchemy import * > > metadata = MetaData() > > calendars_table = Table('calendars', metadata, > Column('id', Integer, primary_key=True), > Column('t

Re: How to get all variables of some module in that module

2008-10-20 Thread Steven D'Aprano
On Tue, 21 Oct 2008 11:56:30 +0700, Alex Gusarov wrote: > Here I want to get all Table instances of current module and put them > into dictionary by names, but I don't know how I can get all variables > of current module in the end of this module. Please, give me a hint. >>> import math >>> dir(m

How to get all variables of some module in that module

2008-10-20 Thread Alex Gusarov
Hello, I have a following module and in its end I want to initalize collection of tables: Module: from sqlalchemy import * metadata = MetaData() calendars_table = Table('calendars', metadata, Column('id', Integer, primary_key=True), Column('title', Unicode(50)), Column('color', Unic