Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing an Python app that makes use of a Gtk.AboutDialog. Some of the information shown in the dialog comes from setting properties for bits of info I've just given elsewhere, and I'd like to avoid duplication.

For instance, in the code:

about = Gtk.AboutDialog()

The program name and the version are already specified in (I'm using python-distutils-extra as the build system).

So is there a way to extract that information at runtime (be it from or somewhere else), so that I don't have to manually specify it again?

share|improve this question
up vote 5 down vote accepted

You can place a for example, in the python package for your program, and define the values there, instead of in You can then import that module from or the code which shows the about dialog, and set the appropriate values from the appropriate constants.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.