2 from distutils
.version
import StrictVersion
10 def language_by_filename(name
):
11 extension
= name
.rsplit(".")[-1]
12 if extension
in ["v", "vh", "vo"]:
14 if extension
in ["vhd", "vhdl", "vho"]:
18 def write_to_file(filename
, contents
, force_unix
=False):
22 f
= open(filename
, "w", newline
=newline
)
27 return struct
.calcsize("P")*8
30 for n
in os
.listdir(path
):
31 full
= os
.path
.join(path
, n
)
32 if not os
.path
.isdir(full
):
35 yield StrictVersion(n
)