CreateObject.asp 494 B

12345678910111213141516171819
  1. <HTML>
  2. <SCRIPT Language="Python" RUNAT=Server>
  3. # Just for the sake of the demo, our Python script engine
  4. # will create a Python.Interpreter COM object, and call that.
  5. # This is completely useless, as the Python Script Engine is
  6. # completely normal Python, and ASP does not impose retrictions, so
  7. # there is nothing the COM object can do that we can not do natively.
  8. o = Server.CreateObject("Python.Interpreter")
  9. Response.Write("Python says 1+1=" + str(o.Eval("1+1")))
  10. </SCRIPT>
  11. </HTML>