diff --git a/.gitignore b/.gitignore index 0d20b6487c61e7d1bde93acf4a14b7a89083a16d..88124fd5a52ed7b65a20947c9ccdd89af41c7061 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.pyc +Session.vim diff --git a/weboob/__init__.py b/weboob/__init__.py index 82a89af32db3fc66d517dfc794b9988f4e1147c2..9632336af33b38c4af51367a74adea8e1a00a64b 100644 --- a/weboob/__init__.py +++ b/weboob/__init__.py @@ -18,19 +18,4 @@ """ -import os - -from weboob.modules import ModulesLoader -from weboob.config import Config - -class Weboob: - CONFIG_FILE = '%s/.weboobrc' % os.path.expanduser("~") - - def __init__(self, app_name, config_file=CONFIG_FILE): - self.app_name = app_name - self.backends = {} - self.config = Config(self.CONFIG_FILE) - self.config.load() - self.modules_loader = ModulesLoader() - self.modules_loader.load() - +from ouiboube import Weboob diff --git a/weboob/modules.py b/weboob/modules.py index 207e8f8c04ec6f8f823290a33993c9f213f93b26..8e2f53beba21ed09f76b2be5ea4ff016a8c5df5b 100644 --- a/weboob/modules.py +++ b/weboob/modules.py @@ -21,7 +21,7 @@ import re import os import sys -from logging import warning +from logging import warning, debug import weboob.backends as backends @@ -53,4 +53,4 @@ def load_module(self, name): warning('Module "%s" is already loaded (%s)' % self.modules[name].module) return self.modules[name] = backend - print 'Loaded module %s (%s)' % (name, backend.module.__name__) + debug('Loaded module %s (%s)' % (name, backend.module.__name__)) diff --git a/weboob/ouiboube.py b/weboob/ouiboube.py new file mode 100644 index 0000000000000000000000000000000000000000..82a89af32db3fc66d517dfc794b9988f4e1147c2 --- /dev/null +++ b/weboob/ouiboube.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- + +""" +Copyright(C) 2010 Romain Bignon + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 3 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +""" + +import os + +from weboob.modules import ModulesLoader +from weboob.config import Config + +class Weboob: + CONFIG_FILE = '%s/.weboobrc' % os.path.expanduser("~") + + def __init__(self, app_name, config_file=CONFIG_FILE): + self.app_name = app_name + self.backends = {} + self.config = Config(self.CONFIG_FILE) + self.config.load() + self.modules_loader = ModulesLoader() + self.modules_loader.load() +