Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Controlling kwrite by dcop

Reply
Thread Tools

Controlling kwrite by dcop

 
 
qwweeeit@yahoo.it
Guest
Posts: n/a
 
      05-08-2005
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-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?

 
Reply With Quote
 
 
 
 
R. C. James Harlow
Guest
Posts: n/a
 
      05-08-2005
On Sunday 08 May 2005 13:41, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> 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)

iD8DBQBCfhKeY6W16wIJgxQRAsi6AKCWr1CGdm6cC5H4X3vmPa CrmP25hACcDgs7
G04/lydRvfQZQ1bUJ3OgXSk=
=GQMa
-----END PGP SIGNATURE-----

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
module dcop.: How to query running apps? News123 Python 0 11-09-2008 07:45 PM
DCOP memory leak? TimDGCB@gmail.com Python 5 01-31-2007 08:21 PM
Using DCOP from Python Jeffrey Barish Python 1 12-19-2006 02:14 PM
dcop module under Python 2.4 qwweeeit@yahoo.it Python 2 10-10-2005 11:10 AM
PyQt and DCOP Documentation Eric Williams Python 6 11-11-2003 12:00 PM



Advertisments