# 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" :(
Release files for callspectpy 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| callspectpy-0.1.3.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| callspectpy-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.9 kB
Release files / callspectpy-0.1.3.tar.gz
| Download URL | callspectpy-0.1.3.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb792c9d965890a79fd38d9de6ed810f7f487d7eb90ad29ad7e2ff67f9dd6148
|
|
BLAKE2b-256 checksum How to use checksums |
7ac719a74970a78b66c7362822a385c678ee44079fb9be068f03d468adfb47b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / callspectpy-0.1.3-py3-none-any.whl
| Download URL | callspectpy-0.1.3-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
50c22a826834b06a67f1aeccc514e14ae9de0084611f750141d92d408f21956b
|
|
BLAKE2b-256 checksum How to use checksums |
e402c20781a0c11ed23c47d00a713367ef8c4dfd17fd6bb441dce97344231f99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |