ActiveX scripting - does it work?

Mark Hammond mhammond at skippinet.com.au
Fri Jun 9 21:08:03 EDT 2000


This is a problem with WSH that comes with IE5.5 and/or Win2k - it was
brought to my attention about 2 weeks ago, but I since forgot :-(.  I
believe all other Active Scripting hosts are still OK.  Im looking into
this...

You can make it work by simply creating a .pys file, that just contains
the Python code - ie, just the 2 print lines in your example.  You will
then need to run "cscript.exe foo.pys" or "wscript.exe foo.pys", and it
will work correctly (this is the "old way" and still works).  Note that
you can't simply double-click on the .pys file and have it execute (but
you could arrange for that yourself, of course)

Mark.

"Joe Smith" <JoeSmith at bogusaddress.com> wrote in message
news:NOd05.12902$e5.188416 at news1.frmt1.sfba.home.com...
> I have the following file hello.wsf:
> <package>
> <job id="testp">
> <?job debug="true"?>
> <script language="python">
> import sys
> print 'hello world'
> print 'line 2'
> </script>
> </job>
> </package>
>
> It prints out " hello world" (notice beginning space).  It does not
print
> out "line 2".
> Then cscript crashes and brings up the "Application Error" dialog box
> because it memory at 0x00000024 was referenced.
> Then I see a VC++ run time error dialog box "abnormal program
termination".
> Then I see "Fatal Python error: PyEval_ReleaseThread: wrong thread
state" in
> the console window.
>
> I have no problem getting python to execute in ASP pages.  Is it
possible to
> use python in one of these wsf files?  If so, are there any examples?
>
>
>





More information about the Python-list mailing list