root/galaxy-central/eggs/sqlalchemy_migrate-0.5.4-py2.6.egg/migrate/versioning/cfgparse.py @ 3

リビジョン 3, 0.7 KB (コミッタ: kohda, 14 年 前)

Install Unix tools  http://hannonlab.cshl.edu/galaxy_unix_tools/galaxy.html

行番号 
1"""
2   Configuration parser module.
3"""
4
5from ConfigParser import ConfigParser
6
7from migrate.versioning.base import *
8from migrate.versioning import pathed
9
10
11class Parser(ConfigParser):
12    """A project configuration file."""
13
14    def to_dict(self, sections=None):
15        """It's easier to access config values like dictionaries"""
16        return self._sections
17
18
19class Config(pathed.Pathed, Parser):
20    """Configuration class."""
21
22    def __init__(self, path, *p, **k):
23        """Confirm the config file exists; read it."""
24        self.require_found(path)
25        pathed.Pathed.__init__(self, path)
26        Parser.__init__(self, *p, **k)
27        self.read(path)
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。