Skip to content

Commit

Permalink
Improved loader and example
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Aug 1, 2010
1 parent 3a3f101 commit 53e7345
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 8 deletions.
9 changes: 1 addition & 8 deletions src/example.py → example.py
Expand Up @@ -18,17 +18,10 @@
import logging
import os

from DefinitionManager import DefinitionManager
from unwrapt import loader

logging.basicConfig(level=logging.DEBUG)

# Make sure this works being launched from any location
__path__ = os.path.dirname(os.path.abspath(__file__))
folder = "%s/definitions" % __path__

# Load definitions from folder
loader = DefinitionManager(folder)

# Instanciate an apt client
apt = loader.load("apt")

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions src/__init__.py → unwrapt/__init__.py
Expand Up @@ -14,4 +14,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import os

from DefinitionManager import DefinitionManager

# Make sure this works being launched from any location
__path__ = os.path.dirname(os.path.abspath(__file__))
folder = "%s/definitions" % __path__

# Load definitions from folder
loader = DefinitionManager(folder)
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 53e7345

Please sign in to comment.