[Patches] [ python-Patches-637906 ] Allow any file-like object on dis module

noreply@sourceforge.net noreply@sourceforge.net
Thu, 14 Nov 2002 08:56:43 -0800


Patches item #637906, was opened at 2002-11-13 13:24
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=637906&group_id=5470

Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Hye-Shik Chang (perky)
Assigned to: Nobody/Anonymous (nobody)
Summary: Allow any file-like object on dis module

Initial Comment:
This was useful for me to make a restricted environment
by disallowing specific opcodes.


----------------------------------------------------------------------

>Comment By: Tim Peters (tim_one)
Date: 2002-11-14 11:56

Message:
Logged In: YES 
user_id=31435

I'm also missing the connection to restricted environments.

If you want to capture dis output (or output from anything else 
that uses print), the usual way to do it is to assign a StringIO 
instance (or other file-like object) to sys.stdout before 
invoking dis.

----------------------------------------------------------------------

Comment By: Martin v. L÷wis (loewis)
Date: 2002-11-13 18:46

Message:
Logged In: YES 
user_id=21627

Can you please elaborate? In what way does is that useful
for a restricted environment?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=637906&group_id=5470