On Feb 26, 1:16 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Mon, 26 Feb 2007 07:54:12 +0200, "Hendrik van Rooyen" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > > from param import * > > "from <> import *" (or any "from <> import ..." variant) is NOT the > best thing to use. > > Any rebinding to an imported name breaks the linkage to the import > module. > > -- > Wulfraed Dennis Lee Bieber KD6MOG > [EMAIL PROTECTED] [EMAIL PROTECTED] > HTTP://wlfraed.home.netcom.com/ > (Bestiaria Support Staff: [EMAIL PROTECTED]) > HTTP://www.bestiaria.com/
Thank you all for the advice. The suggestion Dennis made about using a 3rd, "common" module to hold global names seemed to be the best idea. The only problem is now I have to type common.r.t instead of just r.t. If I put common in the / lib directory, it is even worse and I have to type lib.common.r.t. I like that it is explicit and perhaps this is the Python way, but it is annoying and produces ugly code to see all those fully-qualified names when all I'd really like to use is r.t throughout the program. Is there a way to import lib.common but then re-bind its attributes to the local space without breaking the linkage? -- http://mail.python.org/mailman/listinfo/python-list