Modules that provide differing functionality amongst different Python versions...

Aahz aahz at pythoncraft.com
Mon Apr 22 12:20:15 EDT 2002


In article <304d20df.0204220628.6aa88bc2 at posting.google.com>,
Allan Crooks <googlegroups at sixtyten.org> wrote:
>aahz at pythoncraft.com (Aahz) wrote in message news:<a9ut8d$dql$1 at panix3.panix.com>...
>> In article <304d20df.0204210629.3f2b4d58 at posting.google.com>,
>> Allan Crooks <googlegroups at sixtyten.org> wrote:
>>>
>>>Another thought I've had is doing it by specifying, say for module
>>>'x', having modules 'x_20', 'x_21', 'x_22', with x simply finding out
>>>what versions of Python it is running on, and then compiling all
>>>modules it can deal with, and then importing all objects into it's
>>>namespace.
>> 
>> Yup.  But do it with a package.
>
>Umm... pardon my ignorance, but what exactly is a package in terms of
>Python? I assume it's just a module that does some form of importing
>of sub-modules (perhaps it uses "from module import *")?

See section 6.4 of the Python tutorial.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

What if there were no rhetorical questions?



More information about the Python-list mailing list