1
0
forked from VimPlug/jedi

Make the profile_output script usable for Python 2 as well

This commit is contained in:
Dave Halter
2018-12-11 00:11:49 +01:00
parent c87398a8c2
commit 26b49f8d01

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3.6
# -*- coding: utf-8 -*-
"""
Profile a piece of Python code with ``profile``. Tries a completion on a
certain piece of code.
@@ -18,7 +19,11 @@ Options:
"""
import time
import profile
try:
# For Python 2
import cProfile as profile
except ImportError:
import profile
import pstats
from docopt import docopt