This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2010年07月12日 20:40 by Yaroslav.Halchenko, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg110134 - (view) | Author: Yaroslav Halchenko (Yaroslav.Halchenko) | Date: 2010年07月12日 20:40 | |
as you can see from below, sys. is used, but never imported (besides a docstring)
$> git describe
upstream/0.5.0.dev-875-gf06319e
$> grep -5 'sys' /home/yoh/proj/misc/python/Tools/gdb/libpython.py
"""
During development, I've been manually invoking the code in this way:
(gdb) python
import sys
sys.path.append('/home/david/coding/python-gdb')
import libpython
end
then reloading it after each edit like this:
(gdb) python reload(libpython)
--
def print_summary(self):
if self.is_evalframeex():
pyop = self.get_pyop()
if pyop:
sys.stdout.write('#%i %s\n' % (self.get_index(), pyop.get_truncated_repr(MAX_OUTPUT_LEN)))
sys.stdout.write(pyop.current_line())
else:
sys.stdout.write('#%i (unable to read python frame information)\n' % self.get_index())
else:
sys.stdout.write('#%i\n' % self.get_index())
class PyList(gdb.Command):
'''List the current Python source code, if any
Use
--
for i, line in enumerate(all_lines[start-1:end]):
linestr = str(i+start)
# Highlight current line:
if i + start == lineno:
linestr = '>' + linestr
sys.stdout.write('%4s %s' % (linestr, line))
# ...and register the command:
PyList()
|
|||
| msg110135 - (view) | Author: Yaroslav Halchenko (Yaroslav.Halchenko) | Date: 2010年07月12日 20:41 | |
sorry -- git describe was by mistake in there... report is based on SVN revision 82502 |
|||
| msg110260 - (view) | Author: Georg Brandl (georg.brandl) * (Python committer) | Date: 2010年07月14日 08:56 | |
Thanks, fixed in r82874. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:03 | admin | set | github: 53481 |
| 2010年07月14日 08:56:19 | georg.brandl | set | status: open -> closed nosy: + georg.brandl messages: + msg110260 resolution: fixed |
| 2010年07月12日 21:11:13 | dmalcolm | set | nosy:
+ dmalcolm |
| 2010年07月12日 20:41:58 | Yaroslav.Halchenko | set | messages: + msg110135 |
| 2010年07月12日 20:40:33 | Yaroslav.Halchenko | create | |