Windows Script Host name space question

Alex Martelli aleax at aleax.it
Tue Aug 21 05:05:30 EDT 2001


"Ben Derstine" <bend at ecollege.com> wrote in message
news:d4baf6cc.0108201355.2e7e32bd at posting.google.com...
> Can someone provide me an example of how I'd use the VBS function
> Weekday from a .pys script (or any VBS built in function for that
> matter.) The only function I now how to use in a .pys is WScript.Echo.

You can use any other attribute of WScript, of course (as well
as any Python built-in function, and any function in modules
you import from Python).

>  When using Weekday in a .vbs file I simply put
>
> Wscript.Echo Weekday(#8/10/2001#)
>
> and it works.  If I try the same thing in the .pys file I get a name
> error on Weekday.  It must be sort of simple name space issue but I
> can't find any documentation on how to make the connection. Thanks,

Weekday is a VBScript function, and I don't know whether it's
exported to other languages at all; I think you can't use VBScript
functions from Python any more than you could use Python functions
from VBScript, unless you explicitly build components in one
language that expose whatever functions you need via COM.


Alex






More information about the Python-list mailing list