What package do I need to install to develop plugins for gedit?

Wes

I'm using Ubuntu 12.04 with python 2.7.3 and PyGObject and I'd like to develop plugins for Gedit in python. I found a simple looking tutorial for this sort of thing here.

According to the tutorial, I need the Gedit module to interact with the plugin interface:

from gi.repository import GObject, Gedit

I keep getting an import error when trying to import the Gedit module. So, my question is: what package do I need to install to get this module?

I've tried: gedit-dev , gedit-plugins

Edit: Here is the full traceback for the above statement:

ERROR:root:Could not find any typelib for Gedit
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name Gedit
K. P. MacGregor

To answer your question, the typelib you need for developing gedit plugins is contained in the gedit package itself.

$ apt-file search Gedit-3.0.typelib
gedit: /usr/lib/gedit/girepository-1.0/Gedit-3.0.typelib

But when using python either interactively or from a script, from gi.repository import Gedit searches /usr/lib/girepository-1.0/ rather than /usr/lib/gedit/girepository-1.0. That is the cause of the import error.

You'll need to create the appropriate .plugin and .py files in ~/.local/share/gedit/plugins and run your code by selecting the plugin in the gedit preferences dialog.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

What package do I need to install to develop plugins for gedit?

From Dev

What package in NuGet do I need to Install to create charts in OxyPlot?

From Dev

If I need a specific library -- what package to install?

From Dev

Do I need to install Eclipse to be able to develop applications with Cordova and Phonegap?

From Dev

What do I need to learn to develop with PoneGap and Sencha Touch?

From Dev

What package do I need to install to get PDF support in the Lyx document processor?

From Dev

What RPM package do I need to install to have GObject documentaion available locally on RHEL 7

From Dev

What package do I need to install to get video-previews in Debian's ranger?

From Dev

Android: What sdk do I need to install

From Dev

What version of Silverlight do I need to install?

From Dev

Do I need to install libcurl source package to use it for development?

From Dev

How do I install gedit-2

From Dev

How do I install gedit-2

From Dev

Where do I find the local and the gedit plugins folders in Ubuntu 14.04?

From Dev

Do I need to install Java plugins for Eclipse Neon if I already have JDK and JRE installed?

From Dev

Play FLV videos in Ubuntu 16.04: what's the (gstreamer?) package(s) I need to install to make Totem do it without error?

From Dev

Do I need XCode to develop an iOS app?

From Dev

What package do I need to build a Qt 5 & CMake application?

From Dev

What is the linux-image-extra package for and do I need it?

From Dev

What is the linux-image-extra package for and do I need it?

From Dev

What package do I need to build a Qt 5 & CMake application?

From Dev

What is the ubuntu-minimal package and do I need it?

From Dev

What Repository do I need to add to my Artifactory so I can get Typesafe's SBT plugins?

From Dev

What specs do I need to know to develop bluetooth (AVRCP 1.4) iPhone app

From Dev

What permissions do I need to install Bower on Vagrant on Windows?

From Dev

What do I need enable or install to get the annotation @RunWith

From Dev

What do I need to install after minimal Xubuntu installation

From Dev

What packages do i need to install on an ubuntu desktop for it to "become a server"?

From Dev

What do I need enable or install to get the annotation @RunWith

Related Related

  1. 1

    What package do I need to install to develop plugins for gedit?

  2. 2

    What package in NuGet do I need to Install to create charts in OxyPlot?

  3. 3

    If I need a specific library -- what package to install?

  4. 4

    Do I need to install Eclipse to be able to develop applications with Cordova and Phonegap?

  5. 5

    What do I need to learn to develop with PoneGap and Sencha Touch?

  6. 6

    What package do I need to install to get PDF support in the Lyx document processor?

  7. 7

    What RPM package do I need to install to have GObject documentaion available locally on RHEL 7

  8. 8

    What package do I need to install to get video-previews in Debian's ranger?

  9. 9

    Android: What sdk do I need to install

  10. 10

    What version of Silverlight do I need to install?

  11. 11

    Do I need to install libcurl source package to use it for development?

  12. 12

    How do I install gedit-2

  13. 13

    How do I install gedit-2

  14. 14

    Where do I find the local and the gedit plugins folders in Ubuntu 14.04?

  15. 15

    Do I need to install Java plugins for Eclipse Neon if I already have JDK and JRE installed?

  16. 16

    Play FLV videos in Ubuntu 16.04: what's the (gstreamer?) package(s) I need to install to make Totem do it without error?

  17. 17

    Do I need XCode to develop an iOS app?

  18. 18

    What package do I need to build a Qt 5 & CMake application?

  19. 19

    What is the linux-image-extra package for and do I need it?

  20. 20

    What is the linux-image-extra package for and do I need it?

  21. 21

    What package do I need to build a Qt 5 & CMake application?

  22. 22

    What is the ubuntu-minimal package and do I need it?

  23. 23

    What Repository do I need to add to my Artifactory so I can get Typesafe's SBT plugins?

  24. 24

    What specs do I need to know to develop bluetooth (AVRCP 1.4) iPhone app

  25. 25

    What permissions do I need to install Bower on Vagrant on Windows?

  26. 26

    What do I need enable or install to get the annotation @RunWith

  27. 27

    What do I need to install after minimal Xubuntu installation

  28. 28

    What packages do i need to install on an ubuntu desktop for it to "become a server"?

  29. 29

    What do I need enable or install to get the annotation @RunWith

HotTag

Archive