1
0
mirror of https://github.com/myhdl/myhdl.git synced 2024-12-14 07:44:38 +08:00

_util.py: remove unused imports

This commit is contained in:
Keerthan Jaic 2015-01-18 01:45:46 -05:00
parent 78eba1bb37
commit 2894164a6d

View File

@ -23,18 +23,15 @@
import ast
import exceptions
import sys
import inspect
import re
from types import FunctionType, GeneratorType, ListType, TupleType
from tokenize import generate_tokens, untokenize, INDENT
from cStringIO import StringIO
def _printExcInfo():
kind, value = sys.exc_info()[:2]
kind, value = sys.exc_info()[:2]
msg = str(kind)
# msg = msg[msg.rindex('.')+1:]
if str(value):
@ -43,6 +40,7 @@ def _printExcInfo():
_isGenFunc = inspect.isgeneratorfunction
def _flatten(*args):
arglist = []
for arg in args:
@ -53,6 +51,7 @@ def _flatten(*args):
arglist.append(arg)
return arglist
def _isTupleOfInts(obj):
if not isinstance(obj, tuple):
return False
@ -61,6 +60,7 @@ def _isTupleOfInts(obj):
return False
return True
def _dedent(s):
"""Dedent python code string."""
@ -70,6 +70,7 @@ def _dedent(s):
result[0] = (INDENT, '')
return untokenize(result)
def _makeAST(f):
s = inspect.getsource(f)
s = _dedent(s)
@ -78,6 +79,7 @@ def _makeAST(f):
tree.lineoffset = inspect.getsourcelines(f)[1]-1
return tree
def _genfunc(gen):
from myhdl._always_comb import _AlwaysComb
from myhdl._always_seq import _AlwaysSeq