Collects execution data from python script
Project description
# 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" :(
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" :(
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
callspectpy-0.1.3.tar.gz
(3.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file callspectpy-0.1.3.tar.gz.
File metadata
- Download URL: callspectpy-0.1.3.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb792c9d965890a79fd38d9de6ed810f7f487d7eb90ad29ad7e2ff67f9dd6148
|
|
| MD5 |
3846698bc508b9399170a19f9491a15d
|
|
| BLAKE2b-256 |
7ac719a74970a78b66c7362822a385c678ee44079fb9be068f03d468adfb47b8
|
File details
Details for the file callspectpy-0.1.3-py3-none-any.whl.
File metadata
- Download URL: callspectpy-0.1.3-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50c22a826834b06a67f1aeccc514e14ae9de0084611f750141d92d408f21956b
|
|
| MD5 |
f12072b84e86a4e1a5d0f00ed42c10c4
|
|
| BLAKE2b-256 |
e402c20781a0c11ed23c47d00a713367ef8c4dfd17fd6bb441dce97344231f99
|