Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nightmachinery/pyexfiltrator
Julia's `@exfiltrate` for Python; Exports the local variables into a global dictionary for later debugging.
https://github.com/nightmachinery/pyexfiltrator
debug debugging debugging-tool debugging-tools exfiltrator infiltrator ipython python repl repl-driven
Last synced: 24 days ago
JSON representation
Julia's `@exfiltrate` for Python; Exports the local variables into a global dictionary for later debugging.
- Host: GitHub
- URL: https://github.com/nightmachinery/pyexfiltrator
- Owner: NightMachinery
- License: mit
- Created: 2021-08-28T06:58:16.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T17:33:15.000Z (11 months ago)
- Last Synced: 2024-10-12T16:41:19.212Z (24 days ago)
- Topics: debug, debugging, debugging-tool, debugging-tools, exfiltrator, infiltrator, ipython, python, repl, repl-driven
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.org
- License: LICENSE
Awesome Lists containing this project
README
#+TITLE: PyExfiltrator
Julia's [[https://github.com/JuliaDebug/Infiltrator.jl#exfiltrate][@exfiltrate]] for Python; Exports the local variables into a global dictionary for later debugging.
* Installation
#+begin_example zsh
pip install pyexfiltrator
#+end_exampleOr install the latest master:
#+begin_example zsh
pip install -U 'git+https://github.com/NightMachinary/PyExfiltrator'
#+end_example* Usage
#+begin_src python :session p1 :results output :exports both :wrap example
from pyexfiltrator import exfiltrate, exfiltrated
from icecream import ic # prints its inputglobal_var_1 = "Hi"
global_var_2 = "ice"def test_fn(arg1=8, arg2=['a', 'b']):
print("test_fn started")global global_var_1
local_var_1 = (1,2,3)ic(exfiltrate())
print("test_fn finished")
def test_fn2(arg1=3, arg3='monkey'):
print("test_fn2 started")local_var_2 = None
ic(exfiltrate())
print("test_fn2 finished")
test_fn(arg1=10)
ic(exfiltrated)
test_fn2()
ic(exfiltrated)
#+end_src#+RESULTS:
#+begin_example
>>> test_fn started
ic| exfiltrate(): {'arg1': 10, 'arg2': ['a', 'b'], 'local_var_1': (1, 2, 3)}
test_fn finished
ic| exfiltrated: {'arg1': 10, 'arg2': ['a', 'b'], 'local_var_1': (1, 2, 3)}
test_fn2 started
ic| exfiltrate(): {'arg1': 3, 'arg3': 'monkey', 'local_var_2': None}
test_fn2 finished
ic| exfiltrated: {'arg1': 3,
'arg2': ['a', 'b'],
'arg3': 'monkey',
'local_var_1': (1, 2, 3),
'local_var_2': None}
#+end_example* License
The MIT License