With the permission of Rocky, I am forwarding his reply here verbatim:

   I am in Crackow right now and my Internet setup is not quite ideal.   
   Below is why pyimport relative is used. I will reply in full when I get
   back in about a week. But here are the salient points
   Python's import relative does not handle the development style I use.
   This style is that I can run the entire program or submodules of the
   program without installing any of them. Or run as an installed egg.
   By using import relative I don't even have to declare which parts form
   submodules.
   I think Python's import relative can handle this part.
   But it is with the following additional caveat that Python's import
   relative falls down.
   See
   [1] 
http://groups.google.pl/group/comp.lang.python/browse_thread/thread/a5c08a6456d1bcd2/43f7f1dffb4b5495?hl=en&lnk=gst&q=import+relative+rocky#43f7f1dffb4b5495
   Each "module" file has some standalone code that demos the code and can
   be used for understanding. I use it as a quick way to test changes. I
   generally put code here this in advance of a unit test which is a more
   heavyweight kind of thing.
   This style for example is described, lauded as a wonderful feature of
   Python and used in Mark Pilgrim's "Dive into Python".
   Of course it is possible to rewrite code to use Python's import
   relative, but I would loose this development style. So it is not out of
   ignorance of Python's import relative that I did this but because of
   deficiency. So it is my belief that the pyimport-relative package adds
   value which is why it is a separate package. Others may find benefit in
   this kind of style. If enough people find benefit, it may foster future
   improvements in Python's import relative.


On Thu, 27 May 2010, Sandro Tosi wrote:

> mh, probably I'm missing something:

> - is pyimport-relative only available for 2.4?
> - is pyimport-relative an incompatible implementation of relative
> imports as present in python >=2.5 ?
> - would it be possible to "port" to relative import as in python >=
> 2.5 and declare pydbgr as only available for >= 2.5 (Lenny has 2.5 as
> default...)?

> IMHO, either use the relimp as in python >= 2.5 or don't use at all
> (as Piotr just suggested).

> Regards,
> Sandro
-- 
                                  .-.
=------------------------------   /v\  ----------------------------=
Keep in touch                    // \\     (yoh@|www.)onerussian.com
Yaroslav Halchenko              /(   )\               ICQ#: 60653192
                   Linux User    ^^-^^    [175555]


Attachment: signature.asc
Description: Digital signature

Reply via email to