Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92998

Re: instance as module

From Robin Becker <robin@reportlab.com>
Subject Re: instance as module
Date 2015-06-22 10:24 +0100
References <mailman.626.1434706168.13271.python-list@python.org> <55851538$0$1667$c3e8da3$5496439d@news.astraweb.com>
Newsgroups comp.lang.python
Message-ID <mailman.697.1434965069.13271.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

instance as module Robin Becker <robin@reportlab.com> - 2015-06-19 10:29 +0100
  Re: instance as module Steven D'Aprano <steve@pearwood.info> - 2015-06-20 17:24 +1000
    Re: instance as module Robin Becker <robin@reportlab.com> - 2015-06-22 10:24 +0100

csiph-web