smiley – Python Application Tracer
Smiley includes several subcommands for running Python programs and monitoring all of the internal details for recording and reporting.
Commands
The main program for Smiley is smiley. It includes several sub-commands.
run
Run an application and trace its execution.
monitor
Listen for trace data from an application running under the run command.
help
Get help for the smiley command or a subcommand.
Installing
Install with pip:
$ pip install smiley
Using
In one terminal window, run the monitor command:
$ smiley monitor
In a second terminal window, use smiley to run an application. This example uses test.py from the test_app directory in the smiley source tree.
$ smiley run ./test.py args: ['./test.py'] input = 10 Leaving c() [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] Leaving b() Leaving a()
The monitor session will show the execution path and local variables for the app.
Starting new run: ./test.py
test.py: 1: import test_funcs
test.py: 1: import test_funcs
test_funcs.py: 1: import sys
test_funcs.py: 1: import sys
test_funcs.py: 3: def gen(m):
test_funcs.py: 8: def c(input):
test_funcs.py: 14: def b(arg):
test_funcs.py: 21: def a():
test_funcs.py: 21: return>>> None
test.py: 3: if __name__ == '__main__':
test.py: 4: test_funcs.a()
test_funcs.py: 21: def a():
test_funcs.py: 22: print 'args:', sys.argv
test_funcs.py: 23: b(2)
test_funcs.py: 14: def b(arg):
arg = 2
test_funcs.py: 15: val = arg * 5
arg = 2
test_funcs.py: 16: c(val)
arg = 2
val = 10
test_funcs.py: 8: def c(input):
input = 10
test_funcs.py: 9: print 'input =', input
input = 10
test_funcs.py: 10: data = list(gen(input))
input = 10
test_funcs.py: 3: def gen(m):
m = 10
test_funcs.py: 4: for i in xrange(m):
m = 10
test_funcs.py: 5: yield i
i = 0
m = 10
test_funcs.py: 5: return>>> 0
test_funcs.py: 5: yield i
i = 0
m = 10
test_funcs.py: 4: for i in xrange(m):
i = 0
m = 10
test_funcs.py: 5: yield i
i = 1
m = 10
test_funcs.py: 5: return>>> 1
test_funcs.py: 5: yield i
i = 1
m = 10
test_funcs.py: 4: for i in xrange(m):
i = 1
m = 10
test_funcs.py: 5: yield i
i = 2
m = 10
test_funcs.py: 5: return>>> 2
test_funcs.py: 5: yield i
i = 2
m = 10
test_funcs.py: 4: for i in xrange(m):
i = 2
m = 10
test_funcs.py: 5: yield i
i = 3
m = 10
test_funcs.py: 5: return>>> 3
test_funcs.py: 5: yield i
i = 3
m = 10
test_funcs.py: 4: for i in xrange(m):
i = 3
m = 10
test_funcs.py: 5: yield i
i = 4
m = 10
test_funcs.py: 5: return>>> 4
test_funcs.py: 5: yield i
i = 4
m = 10
test_funcs.py: 4: for i in xrange(m):
i = 4
m = 10
test_funcs.py: 5: yield i
i = 5
m = 10
test_funcs.py: 5: return>>> 5
test_funcs.py: 5: yield i
i = 5
m = 10
test_funcs.py: 4: for i in xrange(m):
i = 5
m = 10
test_funcs.py: 5: yield i
i = 6
m = 10
test_funcs.py: 5: return>>> 6
test_funcs.py: 5: yield i
i = 6
m = 10
test_funcs.py: 4: for i in xrange(m):
i = 6
m = 10
test_funcs.py: 5: yield i
i = 7
m = 10
test_funcs.py: 5: return>>> 7
test_funcs.py: 5: yield i
i = 7
m = 10
test_funcs.py: 4: for i in xrange(m):
i = 7
m = 10
test_funcs.py: 5: yield i
i = 8
m = 10
test_funcs.py: 5: return>>> 8
test_funcs.py: 5: yield i
i = 8
m = 10
test_funcs.py: 4: for i in xrange(m):
i = 8
m = 10
test_funcs.py: 5: yield i
i = 9
m = 10
test_funcs.py: 5: return>>> 9
test_funcs.py: 5: yield i
i = 9
m = 10
test_funcs.py: 4: for i in xrange(m):
i = 9
m = 10
test_funcs.py: 4: return>>> None
test_funcs.py: 11: print 'Leaving c()', data
data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
input = 10
test_funcs.py: 11: return>>> None
test_funcs.py: 17: print 'Leaving b()'
arg = 2
val = 10
test_funcs.py: 18: return val
arg = 2
val = 10
test_funcs.py: 18: return>>> 10
test_funcs.py: 24: print 'Leaving a()'
test_funcs.py: 24: return>>> None
test.py: 4: return>>> None
Finished run
The Name
George Smiley is a character in popular spy novels by John LeCarre.
References
Inspired by and partially based on
Metadata
Release files for smiley 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| smiley-0.1.0.tar.gz | 9.3 kB | Without provenance | Details for smiley-0.1.0.tar.gz |
Release files / smiley-0.1.0.tar.gz
| Download URL | smiley-0.1.0.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3867f096a6f4dc0229fd7a575b133b99a37173e7640ca37c907b91c2446d8b9a
|
|
BLAKE2b-256 checksum How to use checksums |
d607db265f5c6dd70fea92cc5988abec8125926b00ace2cb486c5ab2562bcc1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for smiley 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.