ActivePython on Windows: References Question

eltronic at eltronic at
Tue Jan 14 22:21:33 CET 2003

On Mon, 13 Jan 2003 14:19:12 -0500 "Alex K. Angelopoulos" <aka at>
> I am about to post an updated version of a
> WSH FAQ I keep, and wanted to get some feedback on my 
> notes about Python use from WSH.  

thanks for posting, I was searching again last week but somehow 
missed any references to your site but found the Mini-FAQ somewhere.

I'm only 3months into python but have used wsh and js for years.
on win95 with activestate2.2 msi version, IE5.5
the script engine is not installed by default and 
there is some incomplete and or out of date docs.

will register the scripting engine for IIS and wsh .pws files

must also be run if you want scripting in IE

unfortunately most of the scripts in the demo dir don't work for me.
another  problem is there is no list of modules which you 
can import w/o error. there is no list of statements nor much guidance 
to the differences in syntax from the more abundant examples in js and
allot of trial and error. there is a win32extensions.chm which has some 
few hints on scripting.
<language=python defer>  doesn't seem to work like the javascript

finding most of the examples in VB could be having some negative effects.
lack of enthusiasm for python as a scripting engine for wsh is likely the
non-portability issue and that python itself runs fine and has all the
extension hooks to do whatever you could hope to do already. why there
many visible examples of scripting IE or pick your favorite application
another story. probably those who have just are too busy to post their
cleaning up the rough edges and documenting takes time but would be much 
appreciated. huge loss, I'm sure there are many that could be very
to the community at large. creating some html and calling IE isn't too
and is far easier to debug.

Mark Hammond seems to be the single source for all the win32 extensions
it appears that you can read local files, there is an updated 
which I think only disallows scripting from IE while continuing to enable

wsh and IIS use. this might be out of date related to the 2 py files
that register the extensions.

you might also edit to disable the rexec limitations or use 
the Microsoft Windows Script Control as mentioned on the ASPN python

you list Python ActiveState Open Source , I'm not quite sure their 
compilation is opensource but it is free and I believe available for
linux as well as windows. what it does do well is pull together enough
of the core and extensions to get up and running with a single install
with out having to download and compile everything.

These modules allow one Python process to generate output via a "print" 
statement,  and another unrelated Python process to display the data. 
This works even if the  Python process generating the output is running
under the context of a service, 

create a shortcut to I call this from a small bat file
win32 programs cant remember the .pif font and position settings on win95
in the properties of the shortcut 
wtrace.bat consists of
set pyt=%YOURPATH%\Python22\python.exe
%pyt%  %1 %2 %3 %4 %5 %6 %7 %8 %9
or something similar
now you just import win32trace in your script then the print 
get routed to the previously open window from the .bat
in IE now the print's are seen in the window the .bat opens
if you want the output in IE you have to document.writeln('whatever')

a few more links
some references and vb examples  
example of scripting outloook 

a section on adding rclick extensions to the context menu 
would also be useful in a FAQ

> FYI, the ancient version of the WSH FAQ I had is accessible from a 
> sub-page of my remote computing site:
> (see the Mini-FAQ entry)
>> "some of the MSDN reference links have broken;" 

they do like to rearange things.
guess they don't like people linking into their
site for the Q##### doc's either any more.


Sign Up for Juno Platinum Internet Access Today
Only $9.95 per month!

More information about the Python-list mailing list