Controlling kwrite by dcop

Discussion in 'Python' started by qwweeeit@yahoo.it, May 8, 2005.

  1. Guest

    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?
     
    , May 8, 2005
    #1
    1. Advertising

  2. On Sunday 08 May 2005 13:41, 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)

    iD8DBQBCfhKeY6W16wIJgxQRAsi6AKCWr1CGdm6cC5H4X3vmPaCrmP25hACcDgs7
    G04/lydRvfQZQ1bUJ3OgXSk=
    =GQMa
    -----END PGP SIGNATURE-----
     
    R. C. James Harlow, May 8, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric Williams

    PyQt and DCOP Documentation

    Eric Williams, Nov 10, 2003, in forum: Python
    Replies:
    6
    Views:
    465
    Fedor Sumkin
    Nov 11, 2003
  2. Replies:
    2
    Views:
    331
  3. Jeffrey Barish

    Using DCOP from Python

    Jeffrey Barish, Dec 18, 2006, in forum: Python
    Replies:
    1
    Views:
    545
    David Boddie
    Dec 19, 2006
  4. DCOP memory leak?

    , Jan 30, 2007, in forum: Python
    Replies:
    5
    Views:
    314
  5. News123
    Replies:
    0
    Views:
    513
    News123
    Nov 9, 2008
Loading...

Share This Page