For Python ASP developers

Syver Enstad syver at NOSPAMcyberwatcher.com
Fri Dec 15 21:29:13 EST 2000


I have been posting to this group a couple of times asking how to call
functions written in other ASP languages from Python.

I seem to have got it down now, the way to do it are as follows:

All functions written in other languages must be prefixed by
ScriptingNamespace.
    ex: ScriptingNamespace.VbScriptFunc() # calls a vb script function
defined in a runat=server script block

I didn't succeed at calling JscriptFunctions however until I found out that
you have to pass a dummy None parameter to
javascript functions without parameters. Like this:

<script language=Jscript runat=server>
function JscriptFunc()
{
    Response.Write("Jscript func called<br/>");
}
</script>

<%
ScriptingNamespace.JscriptFunc() # won't work
ScriptingNamespace.JscriptFunc(None) # will work
%>

The way I found out was the faq on perlscript (com enabled perl) on asp,
as they seem to run into the same issues as with Python.
http://faqs.net/perlscript/





More information about the Python-list mailing list