pstack
Advanced tools
+1
-1
| Metadata-Version: 1.0 | ||
| Name: pstack | ||
| Version: 0.5 | ||
| Version: 0.6 | ||
| Summary: Tool to print python thread and greenlet stacks | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/wooparadog/pstack/ |
| Metadata-Version: 1.0 | ||
| Name: pstack | ||
| Version: 0.5 | ||
| Version: 0.6 | ||
| Summary: Tool to print python thread and greenlet stacks | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/wooparadog/pstack/ |
+1
-1
@@ -12,3 +12,3 @@ # !/usr/bin/env python | ||
| name="pstack", | ||
| version='0.5', | ||
| version='0.6', | ||
| description="Tool to print python thread and greenlet stacks", | ||
@@ -15,0 +15,0 @@ author="Haochuan Guo", |
+8
-3
@@ -5,5 +5,7 @@ #! /usr/bin/env python | ||
| import os | ||
| import sys | ||
| import subprocess | ||
| import tempfile | ||
| import platform | ||
| import functools | ||
@@ -69,2 +71,3 @@ import click | ||
| tmp_fd, tmp_path = tempfile.mkstemp() | ||
| os.chmod(tmp_path, 0777) | ||
| commands = [] | ||
@@ -78,5 +81,5 @@ commands.append(FILE_OPEN_COMMAND) | ||
| args = make_args(pid, command % tmp_path) | ||
| args = ' '.join(make_args(pid, command % tmp_path)) | ||
| process = subprocess.Popen( | ||
| args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=environ) | ||
| args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) | ||
| out, err = process.communicate() | ||
@@ -86,5 +89,7 @@ if verbose: | ||
| print err | ||
| print os.read(tmp_fd, 10240) | ||
| for chunk in iter(functools.partial(os.read, tmp_fd, 1024), ''): | ||
| sys.stdout.write(chunk) | ||
| CONTEXT_SETTINGS = { | ||
@@ -91,0 +96,0 @@ 'help_option_names': ['-h', '--help'], |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
4811
2.89%107
3.88%