<s> import sys <EOL> import os <EOL> import inspect <EOL> sys . path . append ( os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT:..>' , '<STR_LIT:..>' ) ) <EOL> import dbMigrator <EOL> from dbMigrator . driver import Driver <EOL> from dbMigrator . defaultdatabasesource import DefaultDatabaseSource <EOL> from dbMigrator . postgresdatabasehandler import PostgresDatabaseHandler <EOL> class PostgresExample : <EOL> """<STR_LIT>""" <EOL> @ staticmethod <EOL> def build_driver ( ) : <EOL> d = os . path . dirname ( os . path . abspath ( inspect . getfile ( inspect . currentframe ( ) ) ) ) <EOL> inifile = os . path . join ( d , '<STR_LIT>' ) <EOL> if not os . path . exists ( inifile ) : <EOL> inifile = inifile + '<STR_LIT>' <EOL> if not os . path . exists ( inifile ) : <EOL> raise Exception ( "<STR_LIT>" + inifile ) <EOL> dds = DefaultDatabaseSource ( inifile , d ) <EOL> driver = Driver ( dds , PostgresDatabaseHandler ( ) ) <EOL> driver . default_database = "<STR_LIT>" <EOL> driver . is_debug_printing = True <EOL> return driver <EOL> def main ( ) : <EOL> d = PostgresExample . build_driver ( ) <EOL> d . main ( sys . argv ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
