[reportlab-users] Redefining the place where a DTD is searched in pyRXP

Marco Bizzarri m.bizzarri at icube.it
Thu Feb 10 07:34:31 EST 2005


John J. Lee wrote:
> Something like this:
> 
> def eoCB(s,targets=['blah.dtd'],dtdDir=dtdDir):
>     bn = os.path.basename(s)
>     if os.path.basename(s) in targets:
>         fn = os.path.join(dtdDir,bn)
>         if rl_isfile(fn):
>             return fn, open(fn,'t')
>     return s
> 
> 

Thanks John!

I thought this was not called because I tried to cause it to raise an 
exception, etc., but using pdb now I see that the exception are caught 
(like in this example, indeed rl_isfile is not defined).

Thanks however, starting from this it will be simple to devise my solution!

Regards
Marco


More information about the reportlab-users mailing list