Sujet précédent

5.7.1. files.deletable – Module to get files to delete

Sujet suivant

5.8. filters – Rendering of text written in a wiki syntax

Cette page

Autres langues

5.7.2. files.formats — Simple module to test if a file is a CAD file

plmapp.files.formats.CAD_FORMATS = set(['.vs', '.fscript', '.gerber', '.esw', '.ifc', '.stl', '.model', '.fcstd', '.dwb', '.excellon', '.dwg', '.dwf', '.co', '.brep', '.catprocess', '.par', '.catproduct', '.idw', '.psmodel', '.fmz', '.ccm', '.cgr', '.iges', '.prt', '.psm', '.amf', '.dgk', '.stp', '.fm', '.pyt', '.dgn', '.cad', '.ccc', '.xe', '.asc', '.cel', '.scdoc', '.3dmlw', '.vc6', '.dxf', '.tct', '.ccs', '.brp', '.unv', '.ocd', '.dmt', '.emb', '.vlm', '.catdrawing', '.mcd', '.rfa', '.skp', '.acp', '.slddrw', '.jt', '.bin', '.bim', '.drw', '.3dxml', '.step', '.ipn', '.sldprt', '.ipt', '.pwi', '.wrl', '.art', '.exp', '.pln', '.icd', '.rlf', '.g', '.ar', '.iam', '.sldasm', '.dft', '.catpart', '.fmacro', '.tcw', '.grb', '.asm', '.rvt', '.gtc', '.idv'])

a set of CAD file extensions, all values are in lowercase and starts with a dot.

plmapp.files.formats.is_cad_file(filename)[source]

Returns True if filename is a CAD file. Only tests if its extension is in CAD_FORMATS.