-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello gentoo-dev,
I'm working on an app for GSoC that needs to show a diff of two files
to the user. Right now I've just been calling meld from the python
os.system call. I tried running my application as root to show diffs
of system files that belong
Hey!
Maybe I am missing something, but why not use difflib and pygments on
top of that?
Cheers, Domen
On Sun, 2010-05-30 at 10:59 -0400, Christopher Harvey wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hello gentoo-dev,
>
> I'm working on an app for GSoC that needs to show a dif
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 05/30/10 11:21, Domen Kožar wrote:
> Hey!
>
> Maybe I am missing something, but why not use difflib and pygments on
> top of that?
>
> Cheers, Domen
>
That's a good option.
Pros:
Can easily integrate the diff viewer into my application.
Cons:
D
difflib is one of the best Python libraries out there. It does it's job
perfectly.
difflib can generate diff in text, any it's very pluggable (go through
documentation, you will see)
On Sun, 2010-05-30 at 11:27 -0400, Christopher Harvey wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Sun, 30 May 2010 11:27:41 -0400
Christopher Harvey wrote:
> As for generating the diff is it ok to use difflib to generate the
> diff text? I hear there is a diff environment variable..(but I can't
> seem to find it now) should I use that instead?
On 05/30/10 16:59, Christopher Harvey wrote:
> [..] because calling
> os.system("meld file1 file2 &") in python is putting up so many red
> flags in my head it's not funny. [..]
On a sidenote: the subprocess module offers better alternatives to
calling os.system:
http://docs.python.org/library/sub
why not make a temporary copy of the files with appropriate permission,
send a message the application the user originally opened to diff the files,
then apply the user modified file and cleanup the $tmpdir?
This would leave the user the possibility to choose whatever application she
want to do th
Le dimanche 30 mai 2010 à 10:59 -0400, Christopher Harvey a écrit :
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hello gentoo-dev,
>
> I'm working on an app for GSoC that needs to show a diff of two files
> to the user. Right now I've just been calling meld from the python
> os.system ca