OLD | NEW |
1 #!/usr/bin/env python3 | 1 #!/usr/bin/env python3 |
2 | 2 |
3 # portions copyright 2001, Autonomous Zones Industries, Inc., all rights... | 3 # portions copyright 2001, Autonomous Zones Industries, Inc., all rights... |
4 # err... reserved and offered to the public under the terms of the | 4 # err... reserved and offered to the public under the terms of the |
5 # Python 2.2 license. | 5 # Python 2.2 license. |
6 # Author: Zooko O'Whielacronx | 6 # Author: Zooko O'Whielacronx |
7 # http://zooko.com/ | 7 # http://zooko.com/ |
8 # mailto:zooko@zooko.com | 8 # mailto:zooko@zooko.com |
9 # | 9 # |
10 # Copyright 2000, Mojam Media, Inc., all rights reserved. | 10 # Copyright 2000, Mojam Media, Inc., all rights reserved. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 import os | 52 import os |
53 import re | 53 import re |
54 import sys | 54 import sys |
55 import token | 55 import token |
56 import tokenize | 56 import tokenize |
57 import inspect | 57 import inspect |
58 import gc | 58 import gc |
59 import dis | 59 import dis |
60 import pickle | 60 import pickle |
61 from warnings import warn as _warn | 61 from warnings import warn as _warn |
62 try: | 62 from time import monotonic as _time |
63 from time import monotonic as _time | |
64 except ImportError: | |
65 from time import time as _time | |
66 | 63 |
67 try: | 64 try: |
68 import threading | 65 import threading |
69 except ImportError: | 66 except ImportError: |
70 _settrace = sys.settrace | 67 _settrace = sys.settrace |
71 | 68 |
72 def _unsettrace(): | 69 def _unsettrace(): |
73 sys.settrace(None) | 70 sys.settrace(None) |
74 else: | 71 else: |
75 def _settrace(func): | 72 def _settrace(func): |
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
850 DeprecationWarning, 2) | 847 DeprecationWarning, 2) |
851 return _find_strings(filename, encoding=None) | 848 return _find_strings(filename, encoding=None) |
852 | 849 |
853 def find_executable_linenos(filename): | 850 def find_executable_linenos(filename): |
854 _warn("The trace.find_executable_linenos() function is deprecated", | 851 _warn("The trace.find_executable_linenos() function is deprecated", |
855 DeprecationWarning, 2) | 852 DeprecationWarning, 2) |
856 return _find_executable_linenos(filename) | 853 return _find_executable_linenos(filename) |
857 | 854 |
858 if __name__=='__main__': | 855 if __name__=='__main__': |
859 main() | 856 main() |
OLD | NEW |