3 from distutils
.version
import StrictVersion
13 def language_by_filename(name
):
14 extension
= name
.rsplit(".")[-1]
15 if extension
in ["v", "vh", "vo"]:
17 if extension
in ["vhd", "vhdl", "vho"]:
22 def write_to_file(filename
, contents
, force_unix
=False):
26 with
open(filename
, "w", newline
=newline
) as f
:
31 return struct
.calcsize("P")*8
35 for n
in os
.listdir(path
):
36 full
= os
.path
.join(path
, n
)
37 if not os
.path
.isdir(full
):
40 yield StrictVersion(n
)