Bruno Desthuilliers wrote:
As the name imply, built-in modules are built in the interpreter - IOW,
they are part of the interpreter *exposed* as modules[1]. Unless you
have a taste for gory implementation details, just don't worry about this.
Other "ordinary" modules need of course to be execu
Hussein B wrote:
On Aug 20, 6:39 am, Bruno Desthuilliers wrote:
Hussein B a écrit :
One more question:
If I have this structure:
orig/com/domain/project/Klass1.py
Klass2.py
__init__.py
Why com, domain, project should have __init__.py also?
Yes,
Hussein B a écrit :
(snip)
Thank you both for your kind help and patience :)
Built-in modules are compiled
For which definition of "compiled" ?
but even if they are so, when importing
them (sys for example), Python will run their code in order to create
bindings and objects, right?
As the n
On Aug 20, 6:39 am, Bruno Desthuilliers wrote:
> Hussein B a écrit :
> (snip)
>
> > One more question:
> > If I have this structure:
> > orig/com/domain/project/Klass1.py
> > Klass2.py
> > __init__.py
>
> > Why com, domain, project should have __init
Hussein B wrote:
Thank you both for your kind help and patience :)
Built-in modules are compiled but even if they are so, when importing
them (sys for example), Python will run their code in order to create
bindings and objects, right?
I'm learning Python and I want to learn it well, so that I'm
Hussein B a écrit :
(snip)
One more question:
If I have this structure:
orig/com/domain/project/Klass1.py
Klass2.py
__init__.py
Why com, domain, project should have __init__.py also?
Yes, why should they ? Unless you want to mimic Java's package
On Aug 20, 5:43 am, John Machin <[EMAIL PROTECTED]> wrote:
> On Aug 20, 8:08 pm, Hussein B <[EMAIL PROTECTED]> wrote:
>
> > Hey,
> > Suppose I have a Python application consists of many modules (lets say
> > it is a Django application).
> > If all the modules files are importing sys module, how man
On Aug 20, 5:43 am, John Machin <[EMAIL PROTECTED]> wrote:
> On Aug 20, 8:08 pm, Hussein B <[EMAIL PROTECTED]> wrote:
>
> > Hey,
> > Suppose I have a Python application consists of many modules (lets say
> > it is a Django application).
> > If all the modules files are importing sys module, how man
On Aug 20, 8:08 pm, Hussein B <[EMAIL PROTECTED]> wrote:
> Hey,
> Suppose I have a Python application consists of many modules (lets say
> it is a Django application).
> If all the modules files are importing sys module, how many times the
> sys module will be compiled and executed?
> Only once (th
Hussein B a écrit :
Hey,
Suppose I have a Python application consists of many modules (lets say
it is a Django application).
If all the modules files are importing sys module, how many times the
sys module will be compiled and executed?
Only once (the first time the PVM locates, compiles and exec
Hey,
Suppose I have a Python application consists of many modules (lets say
it is a Django application).
If all the modules files are importing sys module, how many times the
sys module will be compiled and executed?
Only once (the first time the PVM locates, compiles and executes the
sys module)?
11 matches
Mail list logo