ActivePython on Windows: References Question

Alex K. Angelopoulos aka at mvps.org
Thu Jan 16 02:28:47 CET 2003


Mark,

One thing I should mention is that I'm approaching this from the perspective of
people who already use vanilla WSH to do system administration and are wanting
to extend their abilities incrementally without tackling an entire new model and
without learning the entire language immediately.

"Mark Hammond" <mhammond at skippinet.com.au> wrote in message
news:Ci5V9.13854$UB4.63122 at news-server.bigpond.net.au...
> Alex K. Angelopoulos wrote:

> ... there is nothing WSH can do that Python itself can not do...

I think we can start with that as a given; with the model for tools which can be
used by languages in active scripting hosts on Windows, every WSH-accessible
enhancement made is also available to Python via COM access anyway.

>  Hence I can see no reason at all to use Python under WSH.

I can think of a significant one, but not one of importance to most Python
users.   If you're an administrator used to working with WSH from VBScript,
Python is an interesting option for expanding your power.  Unfortunately, few of
them will be willing to do a full download and install, then start grinding
through learning both the language and a different model to start doing simple
scripting.  Plopping a little bit of Python code into another set of script tags
in a WSF file, though, is a different story.

Win32 support doesn't really need anything new for that.  The basics were
implemented a long time ago (1998-9?), are sufficient for the present, and with
a new "paradigm" based on the .NET development environment around the corner,
there would be little reason to implement new support for the older, slower,
COM-based access model anyway.

Insofar as there are currently some weaknesses, they are primarily in  the area
of not having useful "plug-and-chug" components for admins thinking about
starting to dabble in Python with their WSH scripts; and a significant reason
for that is the lack of people demanding it.  While googling comp.lang.python, I
think I've seen about 6 questions that would fall into that category in the last
2-3 years, and all of them could be answered "off-the-shelf".

Since I'm asking about this, I suppose I should be the person to implement more
examples if I want them out there, huh?

> > I suspect the major problem is the lack of a lot of interest in this hosting
> > model.
>
> This is largely true.  People using Python are generally unlikely to
> choose IIS/ASP as their web hosting model.  People choosing IIS/ASP as
> their hosting model are more likely to stick with VB/JS.

Yeah, yeah... <g>


> > in source form, a "Forthish" example available for download from MSKB.
>
> That is a blast from the past :)

Makes a handy RPN calculator engine, too. <g>


> Is pure Python code, but will only work under WSH.  While Python is not
> *creating* these WSH objects directly, it is still creating them and
> using them like any other COM object.
>
> ie, this code is almost identical to:
> WshShell = win32com.client.Dispatch("WScript.Shell")
> WshShell.Popup(...)
>
> The fact one is run under WSH and the other via Python directly is
> really just a matter of a few levels of indirection.
>
> I'm not trying to argue with anything you said, but am trying to
> downplay the relevence <wink>
>

Those few levels of indirection make a difference to "plug'n'pray" windows
scripters.   We have significant weaknesses in the areas of both
programming/scripting model comprehension and attention span, over there. <g>






More information about the Python-list mailing list