Material, code formating, flake8 compatible code

This commit is contained in:
Bernd Hahnebach
2018-06-10 06:45:20 +02:00
committed by wmayer
parent 6a4cd63510
commit eeb5c5e09d
4 changed files with 96 additions and 104 deletions

View File

@@ -68,7 +68,7 @@ def importFCMat(fileName):
return dict1
def exportFCMat(fileName,matDict):
def exportFCMat(fileName, matDict):
"Write a material dictionary to a FCMat file"
try:
import ConfigParser as configparser
@@ -79,14 +79,14 @@ def exportFCMat(fileName,matDict):
# create groups
for x in matDict.keys():
grp,key = string.split(x,sep='_')
grp, key = string.split(x, sep='_')
if not Config.has_section(grp):
Config.add_section(grp)
# fill groups
for x in matDict.keys():
grp,key = string.split(x,sep='_')
Config.set(grp,key,matDict[x])
grp, key = string.split(x, sep='_')
Config.set(grp, key, matDict[x])
Preamble = "# This is a FreeCAD material-card file\n\n"
# Writing our configuration file to 'example.cfg'