Controlling kwrite by dcop

Q

qwweeeit

Hi all,
in my cross-reference tool I have the need to highlight the variables
(by printing them in bold).
I am using the kwrite editor, and I am not able to control it from
python.
I was thinking of various solutions:
- consider the text file as html and use <b>...</b>
- use LaTex
- define a "new" language for kwrite with reserved words made up of the
cross-referenced variables (and so printed in bold).
etc..
Googling around I found:
http://phil.freehackers.org/kde/kde-techno/kde-techno-2.html

Python code to make a DCOP call
-------------------------------
#!/usr/bin/env python

from dcop import *

app = DCOPApplication("kwrite")
app.KWriteIface.insertText("This text was inserted from a python
shell!!!", 0)

app = DCOPApplication("konqueror")
app.KonquerorIface.createNewWindow("http://developer.kde.org")


As you can see you can interact with kwrite from dcop.
Unfortunately I don't have this module in my Python (2.3) nor I have
been able to find it.
Can you help me? Or have you a better solution for printing selected
parts of a text file in bold, without possibly changing the editor?
 
R

R. C. James Harlow

As you can see you can interact with kwrite from dcop.
Unfortunately I don't have this module in my Python (2.3) nor I have
been able to find it.

It's normally installed seperately from the main kde libraries - on gentoo
it's a package called dcoppython, that might help you in your search if
you're on a different distro.

james.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBCfhKeY6W16wIJgxQRAsi6AKCWr1CGdm6cC5H4X3vmPaCrmP25hACcDgs7
G04/lydRvfQZQ1bUJ3OgXSk=
=GQMa
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top