Grammalecte  Check-in [08e541402b]

Overview
Comment:[cli] Python 3.5+ for CLI
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | cli
Files: files | file ages | folders
SHA3-256: 08e541402b4a5efc47dd8105f3e7904d17825244d71530ba348f23d82980c9d1
User & Date: olr on 2021-01-25 09:13:06
Other Links: manifest | tags
Context
2021-01-25
11:12
[fr] faux positif check-in: 2afc6b9e71 user: olr tags: trunk, fr
09:13
[cli] Python 3.5+ for CLI check-in: 08e541402b user: olr tags: trunk, cli
2021-01-23
15:50
[fr] ajustements check-in: 852cbe9312 user: olr tags: trunk, fr
Changes

Modified grammalecte-cli.py from [26cba906c4] to [79b3c7cfb2].

128
129
130
131
132
133
134
135
136


137
138
139
140
141
142
143
128
129
130
131
132
133
134


135
136
137
138
139
140
141
142
143







-
-
+
+







            else:
                vSugg = m.group(2)[1:]
            return (nError, cAction, vSugg)


def main ():
    "launch the CLI (command line interface)"
    if sys.version < "3.7":
        print("Python 3.7+ required")
    if sys.version < "3.5":
        print("Python 3.5+ required")
        return

    xParser = argparse.ArgumentParser()
    xParser.add_argument("-f", "--file", help="parse file (UTF-8 required!) [on Windows, -f is similar to -ff]", type=str)
    xParser.add_argument("-ff", "--file_to_file", help="parse file (UTF-8 required!) and create a result file (*.res.txt)", type=str)
    xParser.add_argument("-iff", "--interactive_file_to_file", help="parse file (UTF-8 required!) and create a result file (*.res.txt)", type=str)
    xParser.add_argument("-owe", "--only_when_errors", help="display results only when there are errors", action="store_true")