[vtk-developers] New vtkpython.py - comments.
Miller, James V (CRD)
millerjv at crd.ge.com
Tue Oct 2 11:25:01 EDT 2001
I haven't tried with with VTK 4.0 but I have had good success
using py2exe to create http://py2exe.sourceforge.net/ executables
of vtk python scripts.
I had tried other mechanisms: the installer you mentioned, freeze, etc.
but the only one that worked for me was py2exe.
-----Original Message-----
From: Prabhu Ramachandran [mailto:prabhu at aero.iitm.ernet.in]
Sent: Tuesday, October 02, 2001 6:13 AM
To: vtk-developers at public.kitware.com
Subject: [vtk-developers] New vtkpython.py - comments.
hi,
I was checking out the Python installer
(http://www.mcmillan-inc.com/install1.html) and had trouble with
getting VTK going with it properly. I was looking at the code in
Wrapping/Python/*.py and have the following comments.
vtkpython.py
^^^^^^^^^^^^^
The code in vtkpython.py, though short relies on "exec hacks". Could
we modify this to be done with explicit import statements? Earlier
with vtk3.2 the vtkpython.c used to generate vtkpython.so and would do
this.
The problem with using exec "from "+kit_name+" import *" is that the
python installer will be unable to find the libraries since it cannot
figure out what is being imported. Of course, using the exec makes the
code small but maybe we should look and see if its the "right way" of
doing things?
Making this code smaller doesn't give us much since, it is unlikely to
change much over time. Using a longer version makes it easier to use
the installer for python/vtk programs. What do you think?
vtkLoadPythonTkWidgets.py
^^^^^^^^^^^^^^^^^^^^^^^^^
The vtkLoadPythonTkWidgets.py code also runs into trouble with the
installer. The code implicitly assumes that sys.path is a string -
which it isnt when you use the installer. This is easily modified by
adding a simple try block. Can I make this modification and commit
it?
thanks,
prabhu
--
Those who hate and fight must stop themselves -- otherwise it is not
stopped.
-- Spock, "Day of the Dove", stardate unknown
_______________________________________________
vtk-developers mailing list
vtk-developers at public.kitware.com
http://public.kitware.com/mailman/listinfo/vtk-developers
More information about the vtk-developers
mailing list