Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #73502

Re: How to distribute python console program

From Terry Reedy <tjreedy@udel.edu>
Subject Re: How to distribute python console program
Date 2014-06-22 14:25 -0400
References <bc95879a-5f0b-4b79-bfc9-71a3d61fc224@googlegroups.com> <lo698o$cha$1@ger.gmane.org>
Newsgroups comp.lang.python
Message-ID <mailman.11191.1403461569.18130.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

How to distribute python console program Nicholas Cannon <nicholascannon1@gmail.com> - 2014-06-21 19:51 -0700
  Re: How to distribute python console program Jurko Gospodnetić <jurko.gospodnetic@pke.hr> - 2014-06-22 11:56 +0200
  Re: How to distribute python console program Nicholas Cole <nicholas.cole@gmail.com> - 2014-06-22 10:58 +0100
  Re: How to distribute python console program Terry Reedy <tjreedy@udel.edu> - 2014-06-22 14:25 -0400

csiph-web