[Tutor] Sun says: Don't use Java, use Python!
alan.gauld@bt.com
alan.gauld@bt.com
Tue Feb 11 18:43:50 2003
> > production code Python will already have compiled its modules to
> > byte code and only the main module remains in ascii text.
> >
> So doesn't this mean that if you are planning to distribute a Python
> script (as I am), that you should distribute it as a module?
For production Python - and I stress I do very little production code
in Python, I use it for prototyping prior to Java or C++ - I would
write the main script like:
########################
import myrealmodule
if __name__ == "__main__": myrealmodule.run()
#########################
Then I distribute the compiled .pyc files for realmodule and any
other modules that it uses. That way the genuinely interpreted code
is minimised.
Alan G.