]> git.phdru.name Git - bookmarks_db.git/blob - robots.py
Added __all__.
[bookmarks_db.git] / robots.py
1 """Thin wrapper for module Robots. Provides "default" robot
2
3 This file is a part of Bookmarks database and Internet robot.
4 """
5
6 __version__ = "$Revision$"[11:-2]
7 __revision__ = "$Id$"[5:-2]
8 __date__ = "$Date$"[7:-2]
9 __author__ = "Oleg Broytman <phd@phdru.name>"
10 __copyright__ = "Copyright (C) 1997-2011 PhiloSoft Design"
11 __license__ = "GNU GPL"
12
13 __all__ = ['import_robot', 'robot']
14
15
16 from os import environ
17 robot_name = environ.get("BKMK_ROBOT", "forking")
18
19 def import_robot(robot_name):
20    exec "from Robots import bkmk_r%s" % robot_name
21    exec "robot = bkmk_r%s.robot_%s" % (robot_name, robot_name)
22    return robot
23
24 robot = import_robot(robot_name)