Skip to content

Instantly share code, notes, and snippets.

@quasoft
quasoft / placexample.py
Created October 8, 2016 13:43
Example for argument parsing with `plac` in Python
#!/usr/bin/env python3
def main(
someoption: ('Optional argument', 'option', 'o'), # Optional argument with abbreviation
someflag: ('Boolean flag - True if set', 'flag', 'f'), # Boolean flag
someint: ("Integer argument",'positional', None, float), # Explicit positional with number type
somestring:"String argument"='hello' # Implicit positional with default value
):
"""Example for parsing arguments with plac"""
print('someint value: %d' % someint)
@quasoft
quasoft / delphi-directives.md
Last active January 5, 2018 09:00
Delphi product/compiler versions

List of Delphi product/compiler versions and conditional directives:

Product Product Version CompilerVersion Directive
Delphi 10.1 Berlin 24 31 VER310
Delphi 10 Seattle 23 30 VER300
Delphi XE8 22 29 VER290
Delphi XE7 21 28 VER280
Delphi XE6 20 27 VER270
Delphi XE5 19 26 VER260