Skip to content

Commit

Permalink
Restructured package files
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Knopp committed Dec 13, 2010
1 parent 7851165 commit 7536146
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 8 deletions.
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions src/__init__.py
@@ -0,0 +1,15 @@
# -*- coding: UTF-8 -*-

from __future__ import absolute_import

import logging

class NullHandler(logging.Handler):
def emit(self, record):
pass

_log = logging.getLogger(__name__)
_log.setLevel(logging.DEBUG)
_log.addHandler(NullHandler())

from . import lib
4 changes: 2 additions & 2 deletions src/dmoz2db.py
Expand Up @@ -32,7 +32,6 @@
import optparse
import logging
import ConfigParser #for the database config file
import handler
import time
from datetime import timedelta
from xml.sax import parse
Expand All @@ -41,7 +40,8 @@
from sqlalchemy.exc import OperationalError
from sqlalchemy.sql.expression import bindparam

from schemes import table_scheme
from lib import handler
from lib.schemes import table_scheme

#the global logger
LOG = logging.Logger(__name__)
Expand Down
17 changes: 17 additions & 0 deletions src/lib/__init__.py
@@ -0,0 +1,17 @@
# -*- coding: UTF-8 -*-

from __future__ import absolute_import
import logging

class NullHandler(logging.Handler):
def emit(self, record):
pass

_log = logging.getLogger(__name__)
_log.setLevel(logging.DEBUG)
_log.addHandler(NullHandler())

from . import handler
from . import content
from . import structure
from . import prepared_statements
File renamed without changes.
11 changes: 6 additions & 5 deletions src/handler.py → src/lib/handler.py
Expand Up @@ -20,6 +20,7 @@
"""

from __future__ import unicode_literals
from __future__ import absolute_import

__version__ = '0.1'
__author__ = 'Johannes Knopp <johannes@informatik.uni-mannheim.de>'
Expand All @@ -32,11 +33,11 @@
from xml.sax import handler
from sqlalchemy.exc import IntegrityError

import schemes.table_scheme as ts
from schemes.xml_scheme import DmozStructure as DS
from schemes.xml_scheme import DmozContent as DC
from structure import Topic
from content import Link
from .schemes import table_scheme as ts
from .schemes.xml_scheme import DmozStructure as DS
from .schemes.xml_scheme import DmozContent as DC
from .structure import Topic
from .content import Link

_log = logging.getLogger(__name__)

Expand Down
Expand Up @@ -21,14 +21,15 @@
"""

from __future__ import unicode_literals
from __future__ import absolute_import

__version__ = '0.1'
__author__ = 'Johannes Knopp <johannes@informatik.uni-mannheim.de>'
__copyright__ = '© Copyright 2010 Johannes Knopp'

from sqlalchemy.sql.expression import bindparam

import schemes.table_scheme as ts
from .schemes import table_scheme as ts

at = ts.aliases_t
ct = ts.categories_t
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 7536146

Please sign in to comment.