Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(21)

Side by Side Diff: Lib/profile.py

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Lib/plistlib.py ('k') | Lib/pstats.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #! /usr/bin/env python3 1 #! /usr/bin/env python3
2 # 2 #
3 # Class for profiling python code. rev 1.0 6/2/94 3 # Class for profiling python code. rev 1.0 6/2/94
4 # 4 #
5 # Written by James Roskind
6 # Based on prior profile module by Sjoerd Mullender... 5 # Based on prior profile module by Sjoerd Mullender...
7 # which was hacked somewhat by: Guido van Rossum 6 # which was hacked somewhat by: Guido van Rossum
8 7
9 """Class for profiling Python code.""" 8 """Class for profiling Python code."""
10 9
11 # Copyright Disney Enterprises, Inc. All Rights Reserved. 10 # Copyright 1994, by InfoSeek Corporation, all rights reserved.
12 # Licensed to PSF under a Contributor Agreement 11 # Written by James Roskind
13 # 12 #
14 # Licensed under the Apache License, Version 2.0 (the "License"); 13 # Permission to use, copy, modify, and distribute this Python software
15 # you may not use this file except in compliance with the License. 14 # and its associated documentation for any purpose (subject to the
16 # You may obtain a copy of the License at 15 # restriction in the following sentence) without fee is hereby granted,
16 # provided that the above copyright notice appears in all copies, and
17 # that both that copyright notice and this permission notice appear in
18 # supporting documentation, and that the name of InfoSeek not be used in
19 # advertising or publicity pertaining to distribution of the software
20 # without specific, written prior permission. This permission is
21 # explicitly restricted to the copying and modification of the software
22 # to remain in Python, compiled Python, or other languages (such as C)
23 # wherein the modified or derived code is exclusively imported into a
24 # Python module.
17 # 25 #
18 # http://www.apache.org/licenses/LICENSE-2.0 26 # INFOSEEK CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
19 # 27 # SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
20 # Unless required by applicable law or agreed to in writing, software 28 # FITNESS. IN NO EVENT SHALL INFOSEEK CORPORATION BE LIABLE FOR ANY
21 # distributed under the License is distributed on an "AS IS" BASIS, 29 # SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
22 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 30 # RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
23 # either express or implied. See the License for the specific language 31 # CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
24 # governing permissions and limitations under the License. 32 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
33
25 34
26 35
27 import sys 36 import sys
28 import os 37 import os
29 import time 38 import time
30 import marshal 39 import marshal
31 from optparse import OptionParser 40 from optparse import OptionParser
32 41
33 __all__ = ["run", "runctx", "Profile"] 42 __all__ = ["run", "runctx", "Profile"]
34 43
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 '__cached__': None, 604 '__cached__': None,
596 } 605 }
597 runctx(code, globs, None, options.outfile, options.sort) 606 runctx(code, globs, None, options.outfile, options.sort)
598 else: 607 else:
599 parser.print_usage() 608 parser.print_usage()
600 return parser 609 return parser
601 610
602 # When invoked as main program, invoke the profiler on a script 611 # When invoked as main program, invoke the profiler on a script
603 if __name__ == '__main__': 612 if __name__ == '__main__':
604 main() 613 main()
OLDNEW
« no previous file with comments | « Lib/plistlib.py ('k') | Lib/pstats.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+