New submission from anatoly techtonik <techto...@gmail.com>:

This code dumps a lot of internal source code info when executed with trace as:

python -m trace --trace file2.py


---[file2.py]
import subprocess

def ret():
  output = subprocess.check_output(['hg', 'id', '-nib'])
  print( output )
  print( output )
  print( output.strip() )
  print( output.strip().split() )

ret()
---

Normally, the last line of the output is:
['e67793ec2995+', '2162+', 'default']

But during trace call it is:
['subprocess.py(1180):', '_dup2(errwrite,', '2)', '---', 'modulename:', 
'subprocess,', 'funcname:', '_dup2', 'subprocess.py(1174):', 'if', 'a', '==', 
'b:', 'subprocess.py(1176):', 'elif', 'a', 'is', 'not', 'None:', 
'subprocess.py(1184):', 'closed', '=', '{', 'None', '}',
...
etc.

----------
files: file2.py
messages: 162347
nosy: techtonik
priority: normal
severity: normal
status: open
title: trace corrupts return result on chained execution
versions: Python 2.7
Added file: http://bugs.python.org/file25832/file2.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15005>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to