Author ncoghlan
Recipients georg.brandl, ncoghlan, terry.reedy
Date 2009-07-18.13:48:53
SpamBayes Score 0.00172006
Marked as misclassified No
Message-id <1247924935.25.0.665989584376.issue6507@psf.upfronthosting.co.za>
In-reply-to
Content
As per Georg's suggestion, a better approach would look like:

from dis import dis
def dis_str(source):
  try:
    c = compile(source, '', 'eval')
  except SyntaxError:
    c = compile(source, '', 'exec')
  return dis(c)
History
Date User Action Args
2009-07-18 13:48:55ncoghlansetrecipients: + ncoghlan, georg.brandl, terry.reedy
2009-07-18 13:48:55ncoghlansetmessageid: <1247924935.25.0.665989584376.issue6507@psf.upfronthosting.co.za>
2009-07-18 13:48:53ncoghlanlinkissue6507 messages
2009-07-18 13:48:53ncoghlancreate