Distribution of latest Python and wxPython, using Java model

I will bring some water to the mill (as we say in french).

A win user's point of view and random remarks.

o Do not forget "Python" is an interpreter. It uses external
modules on the fly, it can uses GUI toolkits as it can use pure
math toolkits. This is certainly one of the strength of Python.

o There is absolutely no reason to tight Python to particular
GUI toolkit. If a user choose a GUI over one another, that the
user's choice. All GUI toolkits have theirs advantages, Tcl/Tk
is the widespread, from there the "IDLE" application. Win users
are very well served with wxPython, some Linux users are happy
with pyGTK or pyQt...

o Python is not thought to be an "executable" creator.

o Python has its versioning issue too. However, when I installed
Python on my win98 platform, the installer allowed (and asked) me
to choose between an user's installation or an administrator
installation. In the latter case, the Python dlls are in the
..\windows\system directory. In the former case, the dlls are in,
let's say, c:\Python23 . This allows to have different Python
versions on the same machine. (The only conflict is the file type
association (*.py, *.pyc), this is a minor problem).

o In every Python dirs I can install all the external package
(Numeric, wxPython, py2exe, PythonWin, ...).

o Where will your wxPRE reside? In the application dir/path or in
the system directory. In the latter case, versioning issue; in the
former, no problem.

o How to handle extra modules, I mean modules that not Python core
or wxPython core modules? Where should they be located?

o "Having a single easy-to-use installer for wxPRE that combines
Python and wxWindows"
Again, if a wxPython user is a Python user a Python user is not
necessaraely a wxPython user.
I have a lot of pure Python applications (maily for math), not
requiring wxPython. Beside this, the Python scripts are nice for
file/dir manipulations, there is even a "grep" module.

o I can not emphase enough the quality of py2exe (Thanks Thomas).
I am not speaking about its intrisic quality as package manager. No,
I'm thinking about the package itsself, it contains everything a
user need. You can package application with a mixture of different
Python and wxPython versions. They all work (for a given platform).
There are no versioning issue at all. Even better, you can burn a
cd with a py2exe-ifed application. Your application will work from
there without having to be installed on the hd.

o py2exe. Of course, the price you have to pay for this is the
size of the application. Today with the hd capacity, it's not a
real problem.

o Windows installer.
py2exe is a packager application, not an installer. The py2exe
package is best used with an installer application, like Inno Setup.
This is the second step. And again we have to be carefull when
writing the Inno Setup script, we have to instruct the script to
where to install the Python/wxPython core files, either in the app
dir or in the win system dir.

o There is some kind of redunduncy in the couple py2exe/Inno Setup.
A elegant solution would be to have an application that creates the
package and the installer at the same time.

o Some of you know my psi application. (An executable application
build around wxPython/Python, that allows to use Python without
having all the Python stuff installed on the machine). I do not
claim it's the best application around the globe). However, I am
suprised by the number of downloads and the messages I got. This
is just to indicate, how final win users like ready-to-use
application.

Jean-Michel Fauth, Switzerland.

"Jean-Michel Fauth" <jmfauth@bluewin.ch> writes:

[...]

o Python has its versioning issue too. However, when I installed
Python on my win98 platform, the installer allowed (and asked) me
to choose between an user's installation or an administrator
installation. In the latter case, the Python dlls are in the
..\windows\system directory. In the former case, the dlls are in,
let's say, c:\Python23 . This allows to have different Python
versions on the same machine.

Not entirely correct - it is because the dlls contain the Python version
in their name. So you can install different versions at the same time,
even in the admin install where the dlls live in the system directory.

(The only conflict is the file type
association (*.py, *.pyc), this is a minor problem).

Not for me, I use batch files named py22.bat, py23.bat and py24.bat that
let me specify the version to use. Although most of the time, I only
type 'script.py' or even 'script'.

o I can not emphase enough the quality of py2exe (Thanks Thomas).
I am not speaking about its intrisic quality as package manager. No,
I'm thinking about the package itsself, it contains everything a
user need. You can package application with a mixture of different
Python and wxPython versions. They all work (for a given platform).
There are no versioning issue at all. Even better, you can burn a
cd with a py2exe-ifed application. Your application will work from
there without having to be installed on the hd.

o py2exe. Of course, the price you have to pay for this is the
size of the application. Today with the hd capacity, it's not a
real problem.

o Windows installer.
py2exe is a packager application, not an installer. The py2exe
package is best used with an installer application, like Inno Setup.
This is the second step. And again we have to be carefull when
writing the Inno Setup script, we have to instruct the script to
where to install the Python/wxPython core files, either in the app
dir or in the win system dir.

o There is some kind of redunduncy in the couple py2exe/Inno Setup.
A elegant solution would be to have an application that creates the
package and the installer at the same time.

Well, there is a sample script which demonstrates this. IIRC,
samples/extending. It builds the exe and then the inno installer.
Not that this sample script is the end of the road - it simply
demonstrates that you can extend py2exe as you wish. (To be honest, the
script extends distutils :wink:

o Some of you know my psi application. (An executable application
build around wxPython/Python, that allows to use Python without
having all the Python stuff installed on the machine). I do not
claim it's the best application around the globe). However, I am
suprised by the number of downloads and the messages I got. This
is just to indicate, how final win users like ready-to-use
application.

Their are other edges where py2exe possibly can also be used: If you
don't pass any of the 'windows', 'console', 'com_servers', or 'service'
commands it's still possible to include modules or packages, and py2exe
builds a zip-archive (and the needed pyds and dlls) containing what you
specified plus the dependencies, and no exe. This zip-file can also be
used by a standard python interpreter by adding its name to sys.path via
the zipimport mechanism.

With some changes to py2exe, this could maybe also be done on other
platforms than windows.

Sorry for the plug, but I couldn't resist.

Thomas

Jean-Michel Fauth wrote:

I will bring some water to the mill (as we say in french).

A win user's point of view and random remarks.

o Do not forget "Python" is an interpreter. It uses external
modules on the fly, it can uses GUI toolkits as it can use pure
math toolkits. This is certainly one of the strength of Python.

o There is absolutely no reason to tight Python to particular
GUI toolkit. If a user choose a GUI over one another, that the
user's choice. All GUI toolkits have theirs advantages, Tcl/Tk
is the widespread, from there the "IDLE" application. Win users
are very well served with wxPython, some Linux users are happy
with pyGTK or pyQt...

Right, those people would still use standard Python. The wxPRE is for users who don't know and don't care that an app they are using is written in Python. Think of it as how Visual Basic apps used to be deployed. The users of an app don't need the whole VB development environment on their machine, just the runtime. However Windows machines didn't originally come with the VB runtime, it had to be installed separatly.

It could also be used by developers who want to easily have multiple versions of wxPython installed.

o Python is not thought to be an "executable" creator.

o Python has its versioning issue too. However, when I installed
Python on my win98 platform, the installer allowed (and asked) me
to choose between an user's installation or an administrator
installation. In the latter case, the Python dlls are in the ..\windows\system directory. In the former case, the dlls are in,
let's say, c:\Python23 . This allows to have different Python versions on the same machine. (The only conflict is the file type
association (*.py, *.pyc), this is a minor problem).

With the wxPRE the Python DLLs would be installed as part of the runtime, and would be located with the wxPRE. So there is no conflict if the standard Python is already installed on the machine (or it is installed later.)

o In every Python dirs I can install all the external package
(Numeric, wxPython, py2exe, PythonWin, ...).

Apps using wxPRE can also include third-party modules with their app bundle.

o Where will your wxPRE reside? In the application dir/path or in
the system directory. In the latter case, versioning issue; in the
former, no problem.

It would be just another application that can be used to run apps that need the runtime.

o How to handle extra modules, I mean modules that not Python core
or wxPython core modules? Where should they be located?

Part of the app's bundle

o "Having a single easy-to-use installer for wxPRE that combines
Python and wxWindows"
Again, if a wxPython user is a Python user a Python user is not
necessaraely a wxPython user.
I have a lot of pure Python applications (maily for math), not
requiring wxPython. Beside this, the Python scripts are nice for
file/dir manipulations, there is even a "grep" module.

Python and wxPRE would not be mutually exclusive.

o I can not emphase enough the quality of py2exe (Thanks Thomas).
I am not speaking about its intrisic quality as package manager. No,
I'm thinking about the package itsself, it contains everything a user need. You can package application with a mixture of different
Python and wxPython versions. They all work (for a given platform).
There are no versioning issue at all. Even better, you can burn a
cd with a py2exe-ifed application. Your application will work from
there without having to be installed on the hd.

You can think of wxPRE as a way to do what py2exe does for your apps, but leaving out Python, wxPython, the standard-lib, etc. That would be expected to already be installed on the users' systems, and multiple apps can use the same wxPRE.

It could also be used to run arbitrary python scripts with a specific verison of Python/wxPython, so you could run "wxPRE-2.5.1.exe MyApp.py" instead of using pythonw.exe.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!