diff --git a/SqltDAO/CodeGen01/Meta.py b/SqltDAO/CodeGen01/Meta.py index 9fe5ce2..6a1c842 100644 --- a/SqltDAO/CodeGen01/Meta.py +++ b/SqltDAO/CodeGen01/Meta.py @@ -12,7 +12,7 @@ class Meta: PRODUCT = "PyDAO 9000" - VERSION = '1.2.4' + VERSION = '1.2.5' @staticmethod def Title(): diff --git a/SqltDAO/CodeGen01/SqlSyntax.py b/SqltDAO/CodeGen01/SqlSyntax.py index 3a123e8..35df8b3 100644 --- a/SqltDAO/CodeGen01/SqlSyntax.py +++ b/SqltDAO/CodeGen01/SqlSyntax.py @@ -1,6 +1,7 @@ # Author: Soft9000.com # 2018/03/08: Class Created # 2021/02/18: Adding DAO / Dict I/O usages. +# 2024/05/24: Pythonic. import os import sys @@ -266,6 +267,7 @@ def _inject_import_csv(self): def _inject_import(self): result = '' + result += self.level.print("# Table creation & open DAO.") result += self.level.print("try:") self.level.inc() result += self.level.print('# dao.open()') @@ -276,7 +278,7 @@ def _inject_import(self): self.level.inc() result += self.level.print("line = fh.readline().strip()") self.level.dec() - result += self.level.print("while len(line) != 0:") + result += self.level.print("while line:") self.level.inc() result += self.level.print("if dao.insert(line.split(sep)) is False:") self.level.inc()