1 |
Hey! |
2 |
|
3 |
Maybe I am missing something, but why not use difflib and pygments on |
4 |
top of that? |
5 |
|
6 |
Cheers, Domen |
7 |
|
8 |
On Sun, 2010-05-30 at 10:59 -0400, Christopher Harvey wrote: |
9 |
> -----BEGIN PGP SIGNED MESSAGE----- |
10 |
> Hash: SHA1 |
11 |
> |
12 |
> Hello gentoo-dev, |
13 |
> |
14 |
> I'm working on an app for GSoC that needs to show a diff of two files |
15 |
> to the user. Right now I've just been calling meld from the python |
16 |
> os.system call. I tried running my application as root to show diffs |
17 |
> of system files that belong to root. I got this error: |
18 |
> |
19 |
> Traceback (most recent call last): |
20 |
> File "/usr/bin/meld", line 90, in <module> |
21 |
> meldapp.main() |
22 |
> File "/usr/lib/meld/meldapp.py", line 982, in main |
23 |
> app = MeldApp() |
24 |
> File "/usr/lib/meld/meldapp.py", line 562, in __init__ |
25 |
> self.prefs = MeldPreferences() |
26 |
> File "/usr/lib/meld/meldapp.py", line 435, in __init__ |
27 |
> super(MeldPreferences, self).__init__("/apps/meld", self.defaults) |
28 |
> File "/usr/lib/meld/prefs.py", line 92, in __init__ |
29 |
> self._gconf.add_dir(rootkey, gconf.CLIENT_PRELOAD_NONE) |
30 |
> glib.GError: Failed to contact configuration server; some possible |
31 |
> causes are that you need to enable TCP/IP networking for ORBit, or you |
32 |
> have stale NFS locks due to a system crash. See |
33 |
> http://projects.gnome.org/gconf/ for information. (Details - 1: |
34 |
> Failed to get connection to session: Did not receive a reply. Possible |
35 |
> causes include: the remote application did not send a reply, the |
36 |
> message bus security policy blocked the reply, the reply timeout |
37 |
> expired, or the network connection was broken.) |
38 |
> |
39 |
> I haven't looked into why this is happening very much because calling |
40 |
> os.system("meld file1 file2 &") in python is putting up so many red |
41 |
> flags in my head it's not funny. If anybody could tell me the proper |
42 |
> gentoo/linux/python way to present a root level diff to a user running |
43 |
> a program through su or sudo I'd really appreciate the help. |
44 |
> |
45 |
> thanks, |
46 |
> Chris |
47 |
> |
48 |
> - -- |
49 |
> My GnuPGP key at: |
50 |
> www.basementcode.com/public_key.txt |
51 |
> -----BEGIN PGP SIGNATURE----- |
52 |
> Version: GnuPG v2.0.14 (GNU/Linux) |
53 |
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ |
54 |
> |
55 |
> iQEcBAEBAgAGBQJMAn1RAAoJEDqfZIFeqFH7brQH/RqeUmCHuopa+SufkzNNT4Ys |
56 |
> 7IJArQCik3vBLJLpeTM3gf3NL3KMWjyzlxxQ8L74KAhItPuA3cVUQKQrSnOCBiDa |
57 |
> y6yfDttBbOptOtcUYn7WkXQDm+BYEdpviMfjtym5ZF2nlGOMzZMxknP4ywXnhLZN |
58 |
> q2169haoG0p1g0D11q2H9B4Vk++PUil7VLgzOfAOcLQ9YpFDkXIdxy5FRaRkx8K4 |
59 |
> lcPfmzFha8OkdBpsXPJdhtY5pmzOEf+ziprDlyD7eCkE1xAkRNhjsNtEz9CTXeLh |
60 |
> l46/tUCZTx+aX9ABW0m13Ache8jGN36+TvsRzRKfzqaMJ0z/wEOeESooPFYHnl0= |
61 |
> =FxxJ |
62 |
> -----END PGP SIGNATURE----- |
63 |
> |
64 |
> |