Skip to content

Commit

Permalink
upd example
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-landy committed Nov 8, 2020
1 parent 099307f commit 87dc3b1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<a href="https://github.com/andy-landy/traceback_with_variables/blob/master/LICENSE"><img alt="License: MIT" src="https://img.shields.io/github/license/andy-landy/traceback_with_variables?color=informational"></a>
<a href="https://pypi.org/project/traceback_with_variables/"><img alt="PyPI" src="https://img.shields.io/pypi/v/traceback_with_variables"></a>
<a href="https://pypi.org/project/traceback_with_variables/"><img alt="PyPI" src="https://img.shields.io/badge/python-3.5+-blue.svg"></a>
<img title="type hints in everything" alt="Annotations coverage" src="https://img.shields.io/badge/type--hints-100%25-blueviolet.svg">
<img title="no obscure objects, only transparent functions and dataclasses" alt="No-OOP coverage" src="https://img.shields.io/badge/no OOP-100%25-blueviolet.svg">
<img title="type hints everywhere" alt="Annotations coverage" src="https://img.shields.io/badge/type--hints-100%25-blueviolet.svg">
<img title="no obscure objects, only transparent functions and dataclass objects" alt="No-OOP coverage" src="https://img.shields.io/badge/no OOP-100%25-blueviolet.svg">
<a href="https://gitter.im/andy-landy/traceback-with-variables"><img alt="Gitter" src="https://img.shields.io/gitter/room/andy-landy/traceback-with-variables?color=blueviolet"></a>
<!--
<a href="https://lgtm.com/projects/g/andy-landy/traceback_with_variables/context:python"><img alt="Language grade: Python" src="https://img.shields.io/lgtm/grade/python/g/andy-landy/traceback_with_variables.svg?logo=lgtm&logoWidth=18"/></a>
Expand Down
46 changes: 27 additions & 19 deletions examples/external_script.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
# if usually you called
path/to/some_external_script.py --some-arg some-value
# or
python3 path/to/some_external_script.py --some-arg some-value
# or
python3 -m some_external_script --some-arg some-value
# or
some_external_command --some-arg some-value
path/to/some_external_script.py --some-arg some-value
# or
python3 path/to/some_external_script.py --some-arg some-value
# or
python3 -m some_external_script --some-arg some-value
# or
some_external_command --some-arg some-value


# then you can upgrade the traceback like this:
# help:
traceback-with-variables --help

# script and it's args
traceback-with-varaibles path/to/some_script.py --some-arg some-value ...

# command known to be a script (e.g. 'pip') and it's args
traceback-with-varaibles pip ...

# help:
traceback-with-variables --help
# a module (e.g. 'http.server') and it's args
traceback-with-varaibles http.server ...

# script and it's args
traceback-with-varaibles path/to/some_external_script.py --some-arg some-value

# command known to be a script (e.g. 'pip') and it's args
traceback-with-varaibles some_external_command --some-arg some-value
# more
# with python -m
python3 -m traceback_with_variables path/to/some_script.py --some-arg some-value

# with python -m
python3 -m traceback_with_variables path/to/some_external_script.py --some-arg some-value
# script and it's args, customized
traceback-with-varaibles --max-value-str-len 100 --num-context-lines 3 path/to/some_script.py --some-arg some-value

# script and it's args, customized
traceback-with-varaibles --max-value-str-len 100 --num-context-lines 3 path/to/some_external_script.py --some-arg some-value
# command known to be a script (e.g. 'pip') and it's args, customized
traceback-with-varaibles --max-value-str-len 100 --num-context-lines 3 some_cmd --some-arg some-value

# command known to be a script (e.g. 'pip') and it's args, customized
traceback-with-varaibles --max-value-str-len 100 --num-context-lines 3 path/to/some_external_script.py --some-arg some-value
# a module (e.g. 'http.server') and it's args
traceback-with-varaibles --max-value-str-len 100 module_name --some-arg some-value

0 comments on commit 87dc3b1

Please sign in to comment.