On 6/22/2014 5:56 AM, Jurko Gospodnetić wrote:
   Hi Nicholas.

On 22.6.2014. 4:51, Nicholas Cannon wrote:
I have a simple program that is ran in the console with
2 modules and i was wondering how i could like export it
so i could give it to someone to use as like a utlitie
in the console?

   One possible bad side to this organization is that the user does not
necessarily know what module1.py & module2.py files are - they are
stored together with other utility scripts but need not be runnable
scripts by themselves. If they can be run as standalone scripts then
that is all fine and well but if they are not - user does now know that
they should not be and possibly what they are related to.

The support modules could end with

if __name__ == '__main__':
  print("y.py is strictly a support module for x.py. When run "
        "by itself, it does not do anything except to print this."

However, I prefer the solution of bundling all into a zip.

--
Terry Jan Reedy


--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to