RE: Python WIN32

Hammond, Mark (MHammond@jm.cmutual.com.au)
Fri, 10 Feb 95 12:11:00 PST

> When winpython.exe starts up, it looksfor and uses STARTUP.PY.
> How can I force it to look for another script. I would like that
> clicking on diferrent icons in the program manager, should start python
with
> different scripts.

Unfortunately, I cant remember what features were in the last release. I
have a new release just about ready, but it is based on 1.2 beta, so I am
not too sure when it can be officially released.

First thing to try:
* Give each Icon a different default directory, and a special PythonWin.INI.
* In the [Python] section of PythonWin.INI, add a line "Startup=abc.py" (the
default is "startup.py"

However, the way I see this heading ultimately is:
* PythonWin.EXE will always load "startup.py" startup.py will always load
"app.py".
* App.py is the code that creates the main frame window, hooks the "File
Open" etc commands.
* (I am sure this is _not_ in the released version) App.py will also grab
the command line, and do any processing of the command line. Alternatively,
the INI file can specify some "user scripts". If the INI file does not
specify user scripts, app.py defaults to loading interact.py (the command
window).

The reason that startup.py and app.py will always be used is that there is a
lot of functionality in these that it doesnt make sense to duplicate - eg,
you always need a main frame window. Later, the user may be able to specify
an app.py derived class to be used.

Much of this framework is yet to be set up. Anyone who would like to
enhance the system is welcome to contribute, but it is something we will be
tackling over the next 4-5 weeks anyway(we need it for our project). In the
mean time, I suggest you add a "startup" entry in PythonWin.INI, and have
this do your work.

Hope this helps.

Mark Hammond (MHammond@cmutual.com.au)