[New-bugs-announce] [issue11816] Add functions to return disassembly as string

Eugene Toder report at bugs.python.org
Sun Apr 10 02:20:10 CEST 2011


New submission from Eugene Toder <eltoder at gmail.com>:

As discussed in Issue11549 a couple of tests need to inspect disassembly of some code. Currently they have to override sys.stdout, run dis and restore stdout back. It would be much nicer if dis module provided functions that return disassembly as a string.

Provided is a patch that adds file argument to most dis functions, defaulting to sys.stdout. On top of that there are 2 new functions: dis_to_str and disassembly_to_str that return disassembly as a string instead of writing it to a file.

----------
components: Library (Lib)
files: dis.diff
keywords: patch
messages: 133437
nosy: eltoder
priority: normal
severity: normal
status: open
title: Add functions to return disassembly as string
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file21598/dis.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11816>
_______________________________________


More information about the New-bugs-announce mailing list