instance as module

Robin Becker robin at reportlab.com
Mon Jun 22 05:24:22 EDT 2015


On 20/06/2015 08:24, Steven D'Aprano wrote:
> On Fri, 19 Jun 2015 07:29 pm, Robin Becker wrote:
>
>> I'm trying to overcome a recursive import issue in reportlab.
..........
>
> I'm afraid I don't understand what you are trying to say here. Why can't the
> user just set up "such a default" e.g. canvas_basefontname. Surely that is
> a string, e.g. "Comic Sans".
>
> Why will a recursive import occur? If the user doesn't want a recursive
> import, they need only ensure that they don't import anything that relies
> on rl_config.
>
>............
I'm afraid this is a failure on the part of reportlab's font handling. For 
almost all user access the font is indeed a string; unfortunately we need also 
to load data for a typical font (eg arial) so that it can be used properly. To 
load the data properly requires other bits of reportlab which use rl_config.

Being able to specify both the font token to use and the method of 
initialization simultaneously seems useful.
-- 
Robin Becker



More information about the Python-list mailing list