#!/bin/sh for f in $@; do sed -i ' s/import gconf/import GConf/g s/gconf\./GConf\./g s/GConf\.client_get_default/GConf.Client.get_default/g s/import gtk/import Gtk/g s/gtk\./Gtk\./g s/Gtk.SIZE_GROUP_/Gtk.SizeGroupMode./g s/Gtk.POLICY_/Gtk.PolicyType./g s/Gtk.STATE_/Gtk.StateType./g s/Gtk.settings_get_default/Gtk.Settings.get_default/g s/Gtk.gdk.screen_width/Gdk.Screen.width/g s/Gtk.gdk.screen_height/Gdk.Screen.height/g s/Gtk.gdk.screen_get_default/Gdk.Screen.get_default/g s/Gtk.TARGET_SAME_WIDGET/Gtk.TargetFlags.SAME_WIDGET/g s/Gtk.icon_theme_get_default/Gtk.IconTheme.get_default/g s/import pango/import Pango/g s/pango\./Pango\./g s/Pango\.FontDescription/Pango\.Font\.description_from_string/g s/import hippo/import Hippo/g s/hippo\./Hippo\./g s/import gio/import Gio/g s/gio\./Gio\./g s/import wnck/import Wnck/g s/wnck\./Wnck\./g s/Wnck.screen_get_default/Wnck.Screen.get_default/g ' $f done echo 'Add "import Gdk" to' rgrep -l Gdk\. $(find . -iname \*.py) | xargs grep -nL import\ Gdk