Import confusion

David Bolen db3l at fitlinxx.com
Mon Apr 9 13:27:30 EDT 2001


Kristian Ovaska <kristian.ovaska at helsinki.fi> writes:

> I normally don't use from-import, but I have special needs for one
> project I'm working on. I process HTML files that contain embedded
> Python code, and I define handy variables and functions that can be
> used by embedded scripts. I make the definitions in a separate module
> to keep code structure clear.

IMHO, there's nothing wrong with this approach, but you're much better
off just importing the definitions module normally ("import xxx"), and
then referencing your variables/functions through that module name.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list