On 28 Mai, 21:48, Matthew Petroff <
matt...@mpetroff.net> wrote:
> While I included enough of Python for Hugin to run, I did not include
> enough for the Python based features to work.
What is the point? Why don't you just do it like Brian in his Windows
build which he published a couple of days before you? It's a python-
enabled build, so to run it, python has to be installed. Not a
crippled isolated version (which is specifically missing the modules
which would be needed to run the few included plugins), but an
ordinary python install which everyone can get with a few clicks from
python.org. Your minimal python takes up lots of space and has heaps
of totally unnecessary stuff, and if any needed python modules can be
installed into it, it would take some wizardry which is certainly way
beyond the usual mechanism of just picking them up from the 'cheese
shop' (the python package index PyPI).
> I also mistook
> "_hsi.pyd" for a ".pyc" file and accidentally deleted it before
> packaging the build.
Ooops... you happened to forget the core component ;-)
If your intention was to provide a demo of the new GUI, you had better
built it without python. Packaging a crippled python interface will
make everyone think it's crap.
> Here is a new build that includes a stripped down
> Python install similar to what is included with Blender or the GIMP
> (the old build only included Python32.dll).
I think this isn't a good idea. I say again: If the user installs a
python-enabled build, he/she needs a proper python installation. You
don't want all the confused users to come complaining on hugin-ptx not
understanding how they can install modules etc.
The python interface is deliberately designed to empower the user.
Anyone can pick one of the template plugins and come up with a
modified version ready to run in a few minutes. This is partly
intended and designed, and partly due to the fact that hugin's
developer community has, so far, not bothered about integrating the
plugins into hugin, so to make them behave differently, there is no
menu or mask or such, you can only 'run' them without parameters. I
hope eventually they will use wxpython to do some GUI, but so far I
feel it's best to leave them open to easy user modification.
GIMP and blender plugins are much more involved, so they are sort of a
closed shop, there is an installation mechanism from inside the
program, and writing them is for a few wizards and may take days. The
whole philosphy behind the hugin plugin interface is to make it as
accessible as possible. This is why there is a menu point 'run python
program' - it simply launches any old plugin from anywhere on the
systen which a user may have written. It's really quite simple. The
more formalized installation of select plugins which, then, appear in
the actions menu, is for well-tested plugins which are considered
worthy of being distributed with hugin.
> I was not able to
> reproduce your instant crash on Windows XP, 7, or 8 developer preview.
This may well be due to the W7 installation I used, which is in a
virtual machine. On XP, which is on a physical machine, I experienced
no crashes.
I do have a few complaints, though. While the new GUI is a matter of
taste, and it seemed to do it's job, The python interface in your
build is mediocre at best:
hsi can only be imported from the place where you have put it.
Normally, python modules go to a place in the python installation
where they live with all the other modules, and any python session on
the system can just import them by the simple statement 'import xyz'.
No joy here.
Running a python session from the command line in c:\Programme\hugin
\bin, I could import hsi, but help(hsi) threw an exception. The plugin
interface is only half of the show; the hsi python module enables any
python script which imports it to use most of hugin's backend
functionality - hugin isn't needed at all. This is another point that
sets it apart from, say, Gimp - I don't think you can import the gimp
into your python programs; there. it's only a plugin interface. Hsi is
both, this is why I often refer to it as hsi/hpi: hugin scripting
interface/hugin plugin interface. And python is the glue to make all
kinds of different modules cooperate. Several of my plugins run from
the command line as well, but all of thgis only really works if python
is installed properly.
Running the simple plugins from hugin did work. But as soon as I tried
to run one of those which require additional modules (which aren't in
your minimal install), the python interface returned -1 and became
stuck in that state, meaning that subsequently trying to run any of
the plugins which did run initially would now fail with the same
return code.
Much as I appreciate that you have finally put some effort into
including the python interface in a windows build, I think the current
state is doing it a disservice. Please consider making it mandatory to
have python installed for a python-enabled hugin to run. I think going
that way, you'll soon have it running nicely, and we can finally see
windows user using (and, hopefully, writing) plugins as well.
Kay