Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Active Scripting in Python

Reply
Thread Tools

Active Scripting in Python

 
 
Jane Austine
Guest
Posts: n/a
 
      09-04-2003
I donwloaded win32all for Python 2.3 and installed it.

I manually run pyscript.py and it returned "successfully registered"
message.

For a simple test(on client side), I created the following html:

<script language=Python>
alert("hello world")
</script>

And opened it in IE6.0 on WinXP. Unfortunately, it doesn't show
anything.

After googling, I tried "pyscript.py --debug" and the trace collector
shows:

Object with win32trace dispatcher created (object=None)
in _InvokeEx_ with GetInterfaceSafetyOptions 0 1
(IID('{BB1A2AE2-A4F9-11CF-8F20-00805F2CD064}'),) None None
in _InvokeEx_ with GetInterfaceSafetyOptions 0 1
(IID('{BB1A2AE1-A4F9-11CF-8F20-00805F2CD064}'),) None None

Am I doing something stupid?

Jane
 
Reply With Quote
 
 
 
 
Syver Enstad
Guest
Posts: n/a
 
      09-04-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) (Jane Austine) writes:

> I donwloaded win32all for Python 2.3 and installed it.
>
> I manually run pyscript.py and it returned "successfully registered"
> message.
>
> For a simple test(on client side), I created the following html:
>
> <script language=Python>
> alert("hello world")
> </script>
>
> And opened it in IE6.0 on WinXP. Unfortunately, it doesn't show
> anything.
>
> After googling, I tried "pyscript.py --debug" and the trace collector
> shows:
>
> Object with win32trace dispatcher created (object=None)
> in _InvokeEx_ with GetInterfaceSafetyOptions 0 1
> (IID('{BB1A2AE2-A4F9-11CF-8F20-00805F2CD064}'),) None None
> in _InvokeEx_ with GetInterfaceSafetyOptions 0 1
> (IID('{BB1A2AE1-A4F9-11CF-8F20-00805F2CD064}'),) None None
>
> Am I doing something stupid?


I think Mark Hammond has disabled the scripting extensions by default,
go to Mark Hammonds site, there should be an explanation on how to
enable it there...

 
Reply With Quote
 
 
 
 
Mark McEahern
Guest
Posts: n/a
 
      09-04-2003
On Wed, 2003-09-03 at 23:23, Jane Austine wrote:
> I donwloaded win32all for Python 2.3 and installed it.
>
> I manually run pyscript.py and it returned "successfully registered"
> message.
>
> For a simple test(on client side), I created the following html:
>
> <script language=Python>
> alert("hello world")
> </script>
>
> And opened it in IE6.0 on WinXP. Unfortunately, it doesn't show
> anything.


I can't test this right now because my Windows machine at home is dead
(long story), but have you tried using:

print "hello world"

OR

document.write("hello world")

I guess my question is whether "alert" is available when you're using
language="Python".

// m


 
Reply With Quote
 
Changjune Kim
Guest
Posts: n/a
 
      09-05-2003

"Jane Austine" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> I donwloaded win32all for Python 2.3 and installed it.
>
> I manually run pyscript.py and it returned "successfully registered"
> message.
>
> For a simple test(on client side), I created the following html:
>
> <script language=Python>
> alert("hello world")
> </script>
>
> And opened it in IE6.0 on WinXP. Unfortunately, it doesn't show
> anything.
>
> After googling, I tried "pyscript.py --debug" and the trace collector
> shows:
>
> Object with win32trace dispatcher created (object=None)
> in _InvokeEx_ with GetInterfaceSafetyOptions 0 1
> (IID('{BB1A2AE2-A4F9-11CF-8F20-00805F2CD064}'),) None None
> in _InvokeEx_ with GetInterfaceSafetyOptions 0 1
> (IID('{BB1A2AE1-A4F9-11CF-8F20-00805F2CD064}'),) None None
>
> Am I doing something stupid?
>
> Jane


Try pyscript_rexec.py instead, with the line 184(raise) of rexec.py
commented out.


 
Reply With Quote
 
Cousin Stanley
Guest
Posts: n/a
 
      09-05-2003
Kim ...

Thanks for the information ...

Disabling the raise statement in pyscript.py
and then running pyscript_rexec.py worked OK ...

/Python/Lib/site-packages/win32comext/axscript/client

pyscript.py

def __setattr__(self, attr, value) :
...
# raise AttributeError, attr # line disabled
...

python pyscript_rexec.py # Python Script Registration

Example ...

http://fastq.com/~sckitching/Python/...X_pyscript.htm

Only tested with .... < win98_SE | IE6 | Python 2.2.1 >

--
Cousin Stanley
Human Being
Phoenix, Arizona


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ruby scripting on microsoft active directory plus exchange Peņa, Botp Ruby 1 04-30-2007 11:37 PM
Python Active Scripting darrick Python 1 10-12-2006 07:38 PM
Using a Scripting Language as Your Scripting Language DaveInSidney Python 0 05-09-2005 03:13 AM
Python is the best and most popular general purpose scripting language; the universal scripting language Ron Stephens Python 23 04-12-2004 05:32 PM
New IE6 security hole: Active scripting JedMeister NZ Computing 2 11-26-2003 04:51 AM



Advertisments