Hello,
please, how do I create a pythonic traceback from a python process that
hangs and is not running in an interpreter that I executed manually
or it is but doesn't react on CTRL-C etc? I'm trying to debug a server
implemented in Python, so I need some analog of 'gdb attach' for C.
Unfortunatelly, googling and reading documentation revealed nothing, so
please excuse if this question is dumb.
Thank you,
Hynek Hanke 3 1289
On 6 ene, 19:45, Hynek Hanke <h...@brailcom.orgwrote:
please, how do I create a pythonic traceback from a python process that
hangs and is not running in an interpreter that I executed manually
or it is but doesn't react on CTRL-C etc? I'm trying to debug a server
implemented in Python, so I need some analog of 'gdb attach' for C.
On Windows, Pythonwin has an option "Break into running code".
Try starting the script with python -i, and send it a signal..
--
Gabriel Genellina
Hynek Hanke wrote:
Hello,
please, how do I create a pythonic traceback from a python process that
hangs and is not running in an interpreter that I executed manually
or it is but doesn't react on CTRL-C etc? I'm trying to debug a server
implemented in Python, so I need some analog of 'gdb attach' for C.
Unfortunatelly, googling and reading documentation revealed nothing, so
please excuse if this question is dumb.
In python2.5, you can run a background thread that listens on a port or
unix socket, and prints a formatted version of sys._current_frames() to
stderr.
-Mike
Klaas wrote:
Hynek Hanke wrote:
>Hello,
please, how do I create a pythonic traceback from a python process that hangs and is not running in an interpreter that I executed manually or it is but doesn't react on CTRL-C etc? I'm trying to debug a server implemented in Python, so I need some analog of 'gdb attach' for C.
....
In python2.5, you can run a background thread that listens on a port or
unix socket, and prints a formatted version of sys._current_frames() to
stderr.
You can also use the signal module to similar effect. Works well in
Twisted, at least: http://blog.vrplumber.com/835
HTH,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Oliver Walczak |
last post by:
This seems to be a quite difficult approach. Try this:
#####################################################################
import traceback
class MyTraceback:
def __init__(self):...
|
by: Robin Becker |
last post by:
def raise_an_error():
a = 3
b = 4
c = 0
try:
a = a/c
except:
import sys, cgitb, traceback, inspect
tbt,tbv,tb = sys.exc_info()
print...
|
by: Josh Close |
last post by:
When sys.excepthook is called, type, value and traceback are passed
into it. How do I get the values of traceback?
I've tried printing it, but I get the memory location. I'm gussing
there are...
|
by: Thomas Guettler |
last post by:
Hi,
the line numbers of inspect.getinnerframes are
different from traceback.format_exception.
This results in wrong lines being shown in cgitb.
An example is below.
I looked at the...
|
by: tryers |
last post by:
looks like this is a virus. i think it is some dodgy
stuff. i thought it was an image file but no it looks
more like an application. be wary of it
>-----Original Message-----
>Osama Bin Ladin...
|
by: Bob Greschke |
last post by:
I want to cause any traceback output from my applications to show up in one
of my dialog boxes, instead of in the command or terminal window (between
running on Solaris, Linux, OSX and Windows...
|
by: gregpinero |
last post by:
I'm running code via the "exec in context" statement within a much
larger program. What I would like to do is capture any possible
errors and show a pretty traceback just like the Python...
|
by: Sami Vaisanen |
last post by:
This is becoming utterly painful process.... I found out that the return
value from "format_exception" function is NOT a list, i.e. PyList_Check()
fails. PySequence_Check() succeeds but then...
|
by: jairathore |
last post by:
Hi,
I m working on a project on which my requirment is like that remotely i control another application by using sendkey.sendwait method, i m sending some keystroke to that application and...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |