callspectpy-0.1.3
توضیحات
Collects execution data from python script
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | callspectpy-0.1.3 |
| نام | callspectpy |
| نسخه کتابخانه | 0.1.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | xliiv |
| ایمیل نویسنده | tymoteusz.jankowski@gmail.com |
| آدرس صفحه اصلی | https://github.com/xliiv/callspect |
| آدرس اینترنتی | https://pypi.org/project/callspectpy/ |
| مجوز | MIT |
# callspectpy
Collects execution data from python script
## CLI
```bash
$ callspectpy -i my-script.py
```
## API
To collect data for specific code, just wrap the code like this:
```python
import callspectpy, os
callspectpy.trace2file_start(
os.path.join(os.path.dirname(os.path.realpath(__file__)), 'callspect.txt')
)
#
# YOUR CODE HERE
#
callspectpy.trace2file_stop()
```
Or better, use context manager:
```python
from callspect.py import trace2file
with trace2file('output.txt'):
# YOUR CODE HERE
```
### TODO:
* exec(code_obj) generates odd "<module>", replace it with name user passes
* when runnnig "from my_package.lib import my_fn", module is equal "lib" :(
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.5 | Python |
نحوه نصب
نصب پکیج whl callspectpy-0.1.3:
pip install callspectpy-0.1.3.whl
نصب پکیج tar.gz callspectpy-0.1.3:
pip install callspectpy-0.1.3.tar.gz