Please provide any additional information below.
First of all, thank you for your great work on this library.
I would like to be able to import the Python implementation as a module so
that I can keep a checkout of the python folder in our common directory
(which is on every system's Python path). If it functioned as a module,
then I wouldn't have to modify all Python paths and treat diff_match_patch
as an edge-case (it could just be checked out directly in the common, or
any folder on the path, and it will Just Work). This will also work for
anyone else who has a common directory already on their path and wants to
use diff_match_patch without modification of their path or creation of
symlinks.
Fix:
Create __init__.py in the python directory, with this inside:
from .diff_match_patch import diff_match_patch, patch_obj
As I understand it (via http://www.python.org/dev/peps/pep-0328/), this
relative import syntax should be compatible with 2.4 or greater. Thanks!
Original issue reported on code.google.com by mike.fot...@gmail.com on 28 Aug 2009 at 4:29
Original issue reported on code.google.com by
mike.fot...@gmail.com
on 28 Aug 2009 at 4:29