Gre7g Luterman <[EMAIL PROTECTED]> writes:

> All the Python files ending in .py are compiled at installation, but
> the majority of the files in bin don't have an extension and so they
> don't get precompiled.  I would guess they get compiled each time
> they are run and the bytecodes are never saved.  That seems kind of
> inefficient.
>
> Is there a way around this?  Couldn't we do something like:
>
> $ mv tmda-address tmda-address.py
> $ ln -s tmda-address.py tmda-address
> $ mv tmda-check-address tmda-check-address.py

See http://python.org/dev/doc/devel/tut/node8.html#SECTION008120000000000000000

Byte-compilation in Python is intended only for modules that you
import. This is why all the .py files under TMDA/ are automatically
byte-compiled by Python.

Even if you renamed the bin programs with a .py suffix, they wouldn't
be byte-compiled by Python, because they aren't modules.

The bulk of TMDA's code is in the modules, so this wouldn't save us
much time anyway. That said, tmda-rfilter is starting to get a little
too fat for my tastes. It wouldn't hurt to refactor some (most) of
that code into modules, but that would involve some hefty design
changes that I'm not sure I want to tackle at this point.

TMDA is probably a good candidate for a complete redesign/rewrite
after the 1.0 branch is released in May. It has really started to
outgrow its britches.
_________________________________________________
tmda-workers mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-workers

Reply via email to