ionelmc / python-hunter

Hunter is a flexible code tracing toolkit.
https://python-hunter.readthedocs.io/
BSD 2-Clause "Simplified" License
794 stars 46 forks source link

Parameter parser helper to replace eval of env variable (#89) #91

Open abitrolly opened 3 years ago

abitrolly commented 3 years ago

@ionelmc I created param parser that allows to split PYTHONHUNTER line down to separate arguments. Maybe it can be used to replace eval mentioned in #89.

The output of the script are multipe PYTHONHUNTER lines followed by parsed arguments.

$ python paramparser.py 

  []
stdlib=False
  stdlib=False
~Q(kind="line"),~Q(module_in=["six","pkg_resources"]),~Q(filename=""),stdlib=False
  ~Q(kind="line")
  ~Q(module_in=["six","pkg_resources"])
  ~Q(filename="")
  stdlib=False
stdlib=False,Q(filename_contains='venv')
  stdlib=False
  Q(filename_contains='venv')