Python, ASP - Namespace (again)

Mark Hammond Mark.Hammond at p98.f112.n480.z2.fidonet.org
Wed Jun 30 15:00:20 EDT 1999


From: "Mark Hammond" <MHammond at skippinet.com.au>

Nikolai Kirsebom wrote in message ...
...
>when I run the statements in the script1.asp file in an interactive window,
>I can create the KSdebatt object, however when I run the script on the
>server - I  get the following message:
>
>Python ActiveX Scripting Engine error '80020009'
>Traceback (innermost last): File "<Script Block >", line 4, in ?
>o=KSdebatt() NameError: KSdebatt
>/ksdebatt/pages/Script1.asp, line 6
>o=KSdebatt()
>
>If it is possible I would like to 'hide' the object (o) inside the KSdebatt
>module - that is to have the instanciation inside the module itself - but
>still be able to access it from the ASP-code in the script (o.Attr....).
Is
>this possible ?

There is no obvious reason to me why this wont work.  Note that if you are
not running win32all-125, then I recommend you upgrade - there have been
some fixes (but none that adddress this, as far as I can tell).

The best I can suggest is that you use the win32trace module and print
statements to work out what the hell is going on.

Eg, making your first line "import win32traceutil" will mean that all print
statement go to a debugging collector.  You can view the print statements by
starting Pythonwin on the same machine, and selecting "Tools/Trace Collector
Debugging Output".

Then use lots of print statements - specifically print dir() etc, to see
exactly what the namespace is...

Mark.






More information about the Python-list mailing list