|
Okay, 3rd times the charm.
I uninstalled, and re-installed both Python 2.4, and the Pywin32
scripting library for the third time. Now XSI recognizes them as an
option.
Thanks for all the installation help.
After adding in the line, the
debugger does not open. I still get the following output:
COMMAND: -script foo.py -lang Python
ERROR - Could not create script handler.
FATAL - Script Aborted.
-Brad
OK,
this means XSI can create the engine, but fails somehow to initialize
it.
I installed PyWin32 204
just to see if I could repro, but it works just fine on my machine. We
will have to debug this on yours.
With a text editor,
open
%PYTHONPATH%\Lib\site-packages\win32comext\axscript\client\framework.py
and insert the
following lines at the beginning of the file:
import pywin.debugger as d
d.brk()
Save the file and restart
xsibatch -script foo.py
-lang Python. If
all goes well, the debugger should open, and then, after you press F5 to
continue, it should stop where Python fails to initialize. Send back the
callstack and I'll see if the problem can be fixed.
- -----Original Message-----
- From: owner-xsi(at)Softimage.COM
[mailto:owner-xsi(at)Softimage.COM]On
Behalf Of Bradley R. Gabe
- Posted At: Wednesday, June 01, 2005 11:48 AM
- Posted To: xsi
- Conversation: installing python
- Subject: RE: installing python
- I ran the script within PythonWin and get the following output:
- >>>
- SUCCESS: Script engine should be available under XSI win32
- >>>
- Can you run the
following script, it will try to create the script handler outside of
XSI.
- -----Original Message-----
- From: owner-xsi(at)Softimage.COM
[mailto:owner-xsi(at)Softimage.COM]On
Behalf Of Bradley R. Gabe
- Posted At: Wednesday, June 01, 2005 9:21 AM
- Posted To: xsi
- Conversation: installing python
- Subject: RE: installing python
- Here's what I'm getting:
- COMMAND: -script foo.py -lang Python
- ERROR - Could not create script handler.
- FATAL - Script Aborted.
- Thanks for the help!
- -Brad
- Try
-
- xsibatch -script
foo.py -lang Python
-
- With a very simple
foo.py like: Application.LogMessage("Hello!")
-
- There is some
supplemental output that often helps find out why Python failed to
start.
- -----Original Message-----
- From: owner-xsi(at)Softimage.COM
[mailto:owner-xsi(at)Softimage.COM]On
Behalf Of Aloys Baillet
- Posted At: Wednesday, June 01, 2005 2:29 AM
- Posted To: xsi
- Conversation: installing python
- Subject: Re: installing python
- OK, and the pywin32 is of course for the right python version (Mark
Hammond, the author, recently added a version for Python 2.5...).
- If it's the case, sorry I don't have any idea except desinstalling
python/pywin32 and xsi...
- Good luck!
- On 6/1/05, Bradley R. Gabe
<brad(at)cg-soup.com> wrote:
- Python 2.4
- pywin32-204
- No, it should work right away...
- That's wierd!
- What version of Python and pywin32 do you use?
- On 6/1/05, Bradley R. Gabe
<brad(at)cg-soup.com> wrote:
- I followed these instructions and the command shell says it's
registered. However, XSI doesn't show Python as one of the optional
languages in the script editor.
- Should it be there by default, or do I have to switch on an
environment variable or add a line somewhere to the startup bats?
- -Brad
- Hi Kim,
- If my memory is good:
- C:\Python24\Lib\site-packages\win32comext\axscript\client\pyscript.py
-register
- should do what you want...
- Cheers!
- Aloys
- On 6/1/05, kim aldis
<kim(at)aldis.org.uk> wrote:
- the last couple of times I installed python xsi
recognised the install immediately after I installed the pywin32 modules
but this time it didn't. There was a batch file to run but I've
mislaid it or can't find it. Can anyone remember for me?
- cheers.
![17949f0.gif]()
- kim(at)cg-soup.com
--
Aloys Baillet - Character TD (at) Animal Logic
--
Aloys Baillet - Character TD (at) Animal Logic
--
Aloys Baillet - Character TD (at) Animal Logic
|