New submission from Eugene Toder <elto...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue11816>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to