diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-05-26 02:45:29 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2012-05-26 02:45:29 (GMT) |
commit | 7ded1f0f694f0f99252ea19eca18b74ea5e36cb0 (patch) | |
tree | 1f07c57fddc9627f3d506b7a8d25ded561f5a2e0 /Lib/trace.py | |
parent | f2bdc3690a59ca2af3f2fa82f506350874ff1467 (diff) | |
download | cpython-7ded1f0f694f0f99252ea19eca18b74ea5e36cb0.zip cpython-7ded1f0f694f0f99252ea19eca18b74ea5e36cb0.tar.gz cpython-7ded1f0f694f0f99252ea19eca18b74ea5e36cb0.tar.bz2 |
Implemented PEP 405 (Python virtual environments).
Diffstat (limited to 'Lib/trace.py')
-rw-r--r-- | Lib/trace.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/trace.py b/Lib/trace.py index 885824a..c0ea090 100644 --- a/Lib/trace.py +++ b/Lib/trace.py @@ -39,8 +39,8 @@ Sample use, programmatically # create a Trace object, telling it what to ignore, and whether to # do tracing or line-counting or both. - tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix,], trace=0, - count=1) + tracer = trace.Trace(ignoredirs=[sys.base_prefix, sys.base_exec_prefix,], + trace=0, count=1) # run the new command using the given tracer tracer.run('main()') # make a report, placing output in /tmp @@ -749,10 +749,10 @@ def main(argv=None): # should I also call expanduser? (after all, could use $HOME) s = s.replace("$prefix", - os.path.join(sys.prefix, "lib", + os.path.join(sys.base_prefix, "lib", "python" + sys.version[:3])) s = s.replace("$exec_prefix", - os.path.join(sys.exec_prefix, "lib", + os.path.join(sys.base_exec_prefix, "lib", "python" + sys.version[:3])) s = os.path.normpath(s) ignore_dirs.append(s) |