1 |
-----BEGIN PGP SIGNED MESSAGE-----
|
2 |
Hash: SHA1
|
3 |
|
4 |
On Sun, 30 May 2010 11:27:41 -0400
|
5 |
Christopher Harvey <chris@××××××××××××.com> wrote:
|
6 |
|
7 |
> As for generating the diff is it ok to use difflib to generate the |
8 |
> diff text? I hear there is a diff environment variable..(but I can't |
9 |
> seem to find it now) should I use that instead? |
10 |
|
11 |
If I correctly understand what you're referring to, that variable is
|
12 |
useful if you just need to present the diff to the user in the format
|
13 |
preferred by him -- he could then choose an alternate diffing program,
|
14 |
offering another output format.
|
15 |
|
16 |
If you need to parse the differences, that's not an option for you as
|
17 |
the diffing program chosen by user might use any freeform output
|
18 |
format, making it unparseable. Thus, in that case difflib is the solu-
|
19 |
tion you're looking for -- it is prepared to provide the differences
|
20 |
in a way suitable for program use.
|
21 |
|
22 |
|
23 |
- --
|
24 |
Best regards,
|
25 |
Michał Górny
|
26 |
|
27 |
<http://mgorny.alt.pl>
|
28 |
<xmpp:mgorny@××××××.ru>
|
29 |
-----BEGIN PGP SIGNATURE-----
|
30 |
Version: GnuPG v2.0.15 (GNU/Linux)
|
31 |
|
32 |
iEYEARECAAYFAkwCjW0ACgkQnGSe5QXeB7uojwCg5bXcUVGR487tyuU+wnNDG5fA
|
33 |
JMkAoKiqCHJXsmQz7aYGU+J+BzTPwQsn
|
34 |
=lRtw
|
35 |
-----END PGP SIGNATURE----- |