Module clarification

Hussein B hubaghdadi at gmail.com
Mon Jul 28 14:07:54 CEST 2008


On Jul 28, 6:55 am, Floris Bruynooghe <floris.bruynoo... at gmail.com>
wrote:
> On Jul 28, 9:54 am, Hussein B <hubaghd... at gmail.com> wrote:
>
> > Hi.
> > I'm a Java guy and I'm playing around Python these days...
> > In Java, we organize our classes into packages and then jarring the
> > packages into JAR files.
> > What are modules in Python?
>
> An importable or runable (i.e. script) collection of classes,
> functions, variables etc...
>
> > What is the equivalent of modules in Java?
>
> Don't know.  Not even sure if it exists, but my Java is old and never
> been great.
>
> > Please correct me if I'm wrong:
> > I saved my Python code under the file   Wow.py
> > Wow.py is now a module and I can use it in other Python code:
> > import Wow
>
> Indeed, you can now access things defined in Wow as Wow.foo
>
> Regards
> Floris

If I have a couple of modules, is there a way to package them? or
there is no such a thing in Python?



More information about the Python-list mailing list