From 0920b2cccbc76e34e3dad5fb739d975d8dc2e0fb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 2 Oct 2010 11:54:46 -0600 Subject: [PATCH] ... --- src/calibre/startup.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/calibre/startup.py b/src/calibre/startup.py index 7e407df569..e77967501e 100644 --- a/src/calibre/startup.py +++ b/src/calibre/startup.py @@ -129,6 +129,17 @@ if not _run_once: fobject = object.__getattribute__(self, 'fobject') return setattr(fobject, attr, val) + def __repr__(self): + fobject = object.__getattribute__(self, 'fobject') + name = object.__getattribute__(self, 'name') + return repr(fobject).replace('>', ' name='+repr(name)+'>') + + def __str__(self): + return repr(self) + + def __unicode__(self): + return repr(self).decode('utf-8') + m = mode[0] random = len(mode) > 1 and mode[1] == '+'