hamster-applet r691 - trunk/hamster
- From: tbaugis svn gnome org
- To: svn-commits-list gnome org
- Subject: hamster-applet r691 - trunk/hamster
- Date: Wed, 4 Feb 2009 18:47:07 +0000 (UTC)
Author: tbaugis
Date: Wed Feb 4 18:47:07 2009
New Revision: 691
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=691&view=rev
Log:
using pyflakes to clean up code
Modified:
trunk/hamster/__init__.py
trunk/hamster/hamster-applet.py
Modified: trunk/hamster/__init__.py
==============================================================================
--- trunk/hamster/__init__.py (original)
+++ trunk/hamster/__init__.py Wed Feb 4 18:47:07 2009
@@ -20,14 +20,10 @@
# along with Project Hamster. If not, see <http://www.gnu.org/licenses/>.
-import os, sys
+import os
from os.path import join, exists, isdir, isfile, dirname, abspath, expanduser
from shutil import copy as copyfile
-
-import gtk, gnome.ui
-from gtk import glade
import gettext
-import locale
# Autotools set the actual data_dir in defs.py
from db import Storage
Modified: trunk/hamster/hamster-applet.py
==============================================================================
--- trunk/hamster/hamster-applet.py (original)
+++ trunk/hamster/hamster-applet.py Wed Feb 4 18:47:07 2009
@@ -27,14 +27,15 @@
import gtk, gnomeapplet
import getopt, sys
-from os.path import *
+import os.path
import gettext, locale
# Allow to use uninstalled
def _check(path):
- return exists(path) and isdir(path) and isfile(path+"/AUTHORS")
+ return os.path.exists(path) and os.path.isdir(path) \
+ and os.path.isfile(path + "/AUTHORS")
-name = join(dirname(__file__), '..')
+name = os.path.join(os.path.dirname(__file__), '..')
if _check(name):
print 'Running uninstalled hamster, modifying PYTHONPATH'
sys.path.insert(0, 'keybinder/.libs')
@@ -43,12 +44,14 @@
import hamster.defs
# Setup i18n
-gettext.bindtextdomain('hamster-applet', abspath(join(hamster.defs.DATA_DIR, "locale")))
+locale_dir = os.path.abspath(os.path.join(hamster.defs.DATA_DIR, "locale"))
+
+gettext.bindtextdomain('hamster-applet', locale_dir)
if hasattr(gettext, 'bind_textdomain_codeset'):
gettext.bind_textdomain_codeset('hamster-applet','UTF-8')
gettext.textdomain('hamster-applet')
-locale.bindtextdomain('hamster-applet', abspath(join(hamster.defs.DATA_DIR, "locale")))
+locale.bindtextdomain('hamster-applet', locale_dir)
if hasattr(locale, 'bind_textdomain_codeset'):
locale.bind_textdomain_codeset('hamster-applet','UTF-8')
locale.textdomain('hamster-applet')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]