Distribution

Martijn Faassen m.faassen at vet.uu.nl
Tue Apr 25 11:04:23 EDT 2000


Highdesertman <HighdesertmanREMOVE at yahoo.com> wrote:
[snip]
> If I use python to develop an application for the windows 9x environment,
>  I have already downloaded the appropriate libraries and version) what form
> does the finished program take? How does it get distributed?

Interesting to you may be Gordon McMillan's installer. See this Parnassus
link:

http://www.vex.net/parnassus/apyllo.py?i=22208368

Unfortunately the link referred to at Parnassus is currently down, as 
it's on the Python starship, which has crashed and its currently being
repeared (the warp^H^H^H^H hard drive gave up).

Also interesting may be the Python distutils:

http://www.python.org/sigs/distutils-sig/

> I remember in
> the early days of BASIC programming, (before compiled basic) your program
> was just raw code that could be (often accidentally) altered or otherwise
> corrupted.

Must be the alien whitespace eating nanoviruses accidentally altering and
corrupting the raw code. If you are in an environment where code can be
accidentally corrupted, choosing for source or binary code won't matter;
binary code can be corrupted as easily and is even harder to repair.

> In order for your basic program to be used, the user had to have
> a basic compiler on board and they loaded your raw source from a text file
> and executed it. Is this how Python is used?

Python is often used in a similar way. There is a Python interpreter on the
system, and you just execute some .py file by typing: python foo.py, or
on Windows, double-clicking on foo.py

Of course then the Python interpreter needs to be installed. There are
various installer solutions which install their own interpreters, Gordon's
being one of them. Perhaps others can add to this thread; I haven't worked
with any.

[snip]
> If Python is dependent on it's interpreter to run, and I am only programming
> for my own needs, then that dosen't represent a weakness.

It also doesn't represent a weakness if you're writing code for other Python
developers to use; for instance a reusable module that does something
interesting. It's also not a big deal if you're using Python to code CGI
scripts for a website; Python does need to be installed on the webserver
then, of course, but that's fairly easy to control.

Note that one idea behind open source is that easy access to the source
makes it easy for other developers to check out and improve your code. Please
keep that in mind when thinking of installation solutions; hiding the source
will make it harder for potentially helpful developers. Also such developers
may not 'trust' closed-source code as much.

> But since Python
> remains relatively unknown as yet, the average user isn't likely to have a
> python interpreter handy.

That's right. That's even a problem for Java, a well-known and well-hyped
language. I've been told that once a Java environment is installed, you can
run all the Java code in the world with it. Now only to install a 
proper Java. I heard there were various versions.. Oh, and on Linux, too! :)

> In addition, one of the real advantages of the
> development of the compiler was that it gave your code a level of protection
> against being tampered with and made it easily useable by a wide audience.

I don't see why you're so afraid people will be tampering with code. It's
been shown that allowing other people to tamper with your code gives you
the possibility to create rather important software -- Linux, Apache, 
Python, and so on. It doesn't have to happen, but it won't happen at all
if you don't open your source. Of course you may make a distinction between
a developer's edition and a user's edition of your program, but why make it
harder for developers to get at your code when you don't have to?

That said, the other argument; more easy to use for normal users, may
be true. It's a large step for the average user to install a Python
interpreter, while they usually don't mind running some installer to
get access to some program. So bundling Python with the program, as
various packaging tools do, may be a good idea in that case. Disadvantage
of this approach is that a user may end up with 20 versions of the Python
interpreter on his system. :)

It's interesting how philosophies about source code changed since the
days of MSDOS; I remember thinking about compilers in the same way.
"A way to make my code seem 'real'!" 

Regards and good luck!

Martijn
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list