summaryrefslogtreecommitdiff
path: root/Lib/trace.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-05-26 03:45:29 +0100
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-05-26 03:45:29 +0100
commit7ded1f0f694f0f99252ea19eca18b74ea5e36cb0 (patch)
tree1f07c57fddc9627f3d506b7a8d25ded561f5a2e0 /Lib/trace.py
parentf2bdc3690a59ca2af3f2fa82f506350874ff1467 (diff)
downloadcpython-git-7ded1f0f694f0f99252ea19eca18b74ea5e36cb0.tar.gz
Implemented PEP 405 (Python virtual environments).
Diffstat (limited to 'Lib/trace.py')
-rw-r--r--Lib/trace.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/trace.py b/Lib/trace.py
index 885824aff2..c0ea090645 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)