[Zope] Name Errors: DTML Document -> External Python Document -> DTML Do cument -> ZSQL cument -> ZSQL

Burwell, Becky <burwell@parc.xerox.com> burwell@parc.xerox.com
Thu, 21 Dec 2000 15:57:31 PST


I have an SQL database that I want to populate using an external
Python method (because I have file I/O code).

So I have something like this:

DTML Document named import_file which has:
    <dtml-call "parsefile()">

----
parsefile is my external Python method.

def parsefile (self):
    # blah, blah
    self.record_info (arg1=value1,arg2=value2)
----
record_info is a DTML document
    <dtml-unless "LookupPrinter(printer=printer)">
        { random code here }
----
And LookupPrinter is a ZSQL Method

So I have:

   DTML Document -> External Python Document -> DTML Document -> ZSQL 
Document

Is this a sane thing to have my External Python Document calling back 
to DTML Documents? 

I keep getting name error on the LookupPrinter.

I tried putting:

 <dtml-unless "LookupPrinter(_.None, _,printer=printer)">

and I still get the name error.

In essence I am trying to have code that will parse a file and then 
record the results in my database.

Thanks.

Becky.