Active Scripting in Python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jane Austine

    Active Scripting in Python

    I donwloaded win32all for Python 2.3 and installed it.

    I manually run pyscript.py and it returned "successful ly 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.p y --debug" and the trace collector
    shows:

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

    Am I doing something stupid?

    Jane
  • Syver Enstad

    #2
    Re: Active Scripting in Python

    janeaustine50@h otmail.com (Jane Austine) writes:
    [color=blue]
    > I donwloaded win32all for Python 2.3 and installed it.
    >
    > I manually run pyscript.py and it returned "successful ly 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.p y --debug" and the trace collector
    > shows:
    >
    > Object with win32trace dispatcher created (object=None)
    > in _InvokeEx_ with GetInterfaceSaf etyOptions 0 1
    > (IID('{BB1A2AE2-A4F9-11CF-8F20-00805F2CD064}') ,) None None
    > in _InvokeEx_ with GetInterfaceSaf etyOptions 0 1
    > (IID('{BB1A2AE1-A4F9-11CF-8F20-00805F2CD064}') ,) None None
    >
    > Am I doing something stupid?[/color]

    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...

    Comment

    • Mark McEahern

      #3
      Re: Active Scripting in Python

      On Wed, 2003-09-03 at 23:23, Jane Austine wrote:[color=blue]
      > I donwloaded win32all for Python 2.3 and installed it.
      >
      > I manually run pyscript.py and it returned "successful ly 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.[/color]

      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="Pytho n".

      // m


      Comment

      • Changjune Kim

        #4
        Re: Active Scripting in Python


        "Jane Austine" <janeaustine50@ hotmail.com> wrote in message
        news:ba1e306f.0 309032023.4038d [email protected] gle.com...[color=blue]
        > I donwloaded win32all for Python 2.3 and installed it.
        >
        > I manually run pyscript.py and it returned "successful ly 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.p y --debug" and the trace collector
        > shows:
        >
        > Object with win32trace dispatcher created (object=None)
        > in _InvokeEx_ with GetInterfaceSaf etyOptions 0 1
        > (IID('{BB1A2AE2-A4F9-11CF-8F20-00805F2CD064}') ,) None None
        > in _InvokeEx_ with GetInterfaceSaf etyOptions 0 1
        > (IID('{BB1A2AE1-A4F9-11CF-8F20-00805F2CD064}') ,) None None
        >
        > Am I doing something stupid?
        >
        > Jane[/color]

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


        Comment

        • Cousin Stanley

          #5
          Re: Active Scripting in Python

          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__(sel f, attr, value) :
          ...
          # raise AttributeError, attr # line disabled
          ...

          python pyscript_rexec. py # Python Script Registration

          Example ...



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

          --
          Cousin Stanley
          Human Being
          Phoenix, Arizona


          Comment

          Working...