Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/g/o/Google2Piwik-HEAD/google2piwik.py   Google2Piwik(Download)
        try:
            config.read_config(options.config_file)
            sql.initialize(config.MYSQL_CREDENTIALS)
        except:
            "Please check your config file and run your script again"
        print "Initialize database connection:",
        try:
            sql.initialize(config.MYSQL_CREDENTIALS)
            print "[OK]"
        except:
            print "[FAILED]"
            exit()
 
        print "Checking tables:",
        failed_tables = sql.check_tables(config.MYSQL_CREDENTIALS["table_prefix"])
        start_date = read_date(options.start_date or config.CONFIG_START)
        end_date = None if not (options.end_date or config.CONFIG_END) else read_date(options.end_date or config.CONFIG_END)
        sql.initialize(config.MYSQL_CREDENTIALS)
 
        CURRENT_VERSION = sql.get_version(config.MYSQL_CREDENTIALS["table_prefix"])

src/g/o/Google2Piwik-HEAD/google2piwikgui.py   Google2Piwik(Download)
        form = QtGui.QFormLayout()
        form.setHorizontalSpacing(40)
        self.db_host_field = QtGui.QLineEdit(config.MYSQL_CREDENTIALS["host"])
        form.addRow(QtGui.QLabel("Host"), self.db_host_field)
        self.db_port_field = QtGui.QLineEdit(config.MYSQL_CREDENTIALS["port"])
        form.addRow(QtGui.QLabel("Port"), self.db_port_field)
        self.db_name_field = QtGui.QLineEdit(config.MYSQL_CREDENTIALS["db"])
        form.addRow(QtGui.QLabel("Name"), self.db_name_field)
        self.db_user_field = QtGui.QLineEdit(config.MYSQL_CREDENTIALS["user"])
        self.db_user_field = QtGui.QLineEdit(config.MYSQL_CREDENTIALS["user"])
        form.addRow(QtGui.QLabel("User"), self.db_user_field)
        self.db_password_field = QtGui.QLineEdit(config.MYSQL_CREDENTIALS["passwd"])
        self.db_password_field.setEchoMode(QtGui.QLineEdit.Password)
        form.addRow(QtGui.QLabel("Password"), self.db_password_field)