python
    def option_pyfirst(context):
        print("In --pyfirst (from %s)" % context)

    def option_pysecond(context, val):
        print("In --pysecond=%s (from %s)" % (val, context))

--pyfirst
--pysecond Hey

$ hledger -f- check

#test reg
#In --pyfirst (from $FILE)
#In --pysecond=Hey (from $FILE)
#end test
#