Skip to content

Add support for dashed commands

Enables commands such as -some-cmd:

from educelab import cmdparse

class CommandParser:
  @staticmethod
  def some_cmd(sep, val):
    return {'arg': float(val)}

cmdparse.parse(['-some-cmd=1.5'], CommandParser)
# [('some-cmd', {'arg': 1.5})]

Also adds unit test framework.

Edited by Seth Parker

Merge request reports

Loading