[Python-Dev] Proposal: from __future__ import unicode_string_literals

"Martin v. Löwis" martin at v.loewis.de
Mon Mar 24 20:30:48 CET 2008


> "I have environment Plone setup on a machine. I also have several
> products from the Plone collective which I use from the custom product
> that contains the custom site code".
> 
> Thats it. It is a specific example. I can't get more specific than
> that without you learning Plone.

Ok, let me try to guess, then. You use

https://svn.plone.org/svn/collective/LatexTool/

and you perform an svn checkout into

/var/lib/zope2.10/instance/plone-site/Products

You start zope, edit the source, or perform a svn update, and then
restart or refresh the product. Correct?

If so, there is a fairly simple way to integrate 2to3: In
OFS.Application.import_product, run 2to3 first before importing the
product, if a file "run2to3.txt" exists in the product's
root directory.

This will perform a copy of the product into

/var/lib/zope2.10/instance/plone-site/Products.2to3

Voila, transparent invocation of 2to3.

Now, if you want pdb to display the original source rather than the one
being converted, subclass pdb and strip out .2to3 from the source
filename.

Regards,
Martin


More information about the Python-Dev mailing list