ruby의 irb/pry 조합과 동일하게 사용할 수 있는 python 유틸리티
ruby의 irb/pry 조합과 동일하게 사용할 수 있는 파이썬 조합이다.
1. ipython
찾은 링크는 다음과 같다.
https://gist.github.com/Integralist/a2f01ab4aabb786268d5006da5013c9e
pip install ipython만 하면 된다.
[~] cat test.py
#!/usr/bin/env python
from IPython import embed
print("1")
embed()
print("2")
print("3")
pry처럼 정확히
[~] ipython test.py
1
Python 3.6.0 (default, Sep 19 2017, 16:07:26)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.4.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]:
2. pdb
https://docs.python.org/3/library/pdb.html
http://pythonstudy.xyz/python/article/505-Python-%EB%94%94%EB%B2%84%EA%B9%85-PDB
[~] cat test.py
#!/usr/bin/env python
import pdb
print("1")
pdb.set_trace()
print("2")
print("3")
[~] python -m pdb test.py
3. pudb
https://github.com/inducer/pudb
http://python -m pudb.run test.py