Faqts : Computers : Programming : Languages : Python : Common Problems

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

4 of 4 people (100%) answered Yes
Recently 1 of 1 people (100%) answered Yes


How can I import constants from one module to another without explicitly listing each constant?

May 14th, 2000 05:57
unknown unknown, Emile van Sebille

from constants import A
from constants import B
from constants import C
Can be simplified to:
from constants import *
will put A, B, C, etc into the current namespace