Пример #1
0
#read preferences from file. If file does not exists, default preferences will be used
pref = BomPref()

have_cfile = os.path.exists(config_file)
if have_cfile:
    pref.Read(config_file)
    say("Config:",config_file)

#pass various command-line options through
pref.verbose = verbose
if args.number is not None:
    pref.boards = args.number
pref.separatorCSV = args.separator

if args.variant is not None:
    pref.pcbConfig = args.variant
print("PCB variant:", pref.pcbConfig)


#write preference file back out (first run will generate a file with default preferences)
if not have_cfile:
    pref.Write(config_file)
    say("Writing preferences file %s"%(config_file,))

#individual components
components = []

#component groups
groups = []

#read out the netlist
Пример #2
0
have_cfile = os.path.exists(config_file)
if have_cfile:
    pref.Read(config_file)
    say("Config:", config_file)

#pass available modules
pref.xlsxwriter_available = xlsxwriter_available

#pass various command-line options through
pref.verbose = verbose
if args.number is not None:
    pref.boards = args.number
pref.separatorCSV = args.separator

if args.variant is not None:
    pref.pcbConfig = set(
        map(lambda x: x.strip().lower(), args.variant.split(",")))
print("PCB variant: ", ", ".join(pref.pcbConfig))

#write preference file back out (first run will generate a file with default preferences)
if not have_cfile:
    pref.Write(config_file)
    say("Writing preferences file %s" % (config_file, ))

#individual components
components = []

#component groups
groups = []

#read out the netlist
net = netlist(input_file, prefs=pref)
Пример #3
0
#read preferences from file. If file does not exists, default preferences will be used
pref = BomPref()

have_cfile = os.path.exists(config_file)
if have_cfile:
    pref.Read(config_file)
    say("Config:",config_file)

#pass various command-line options through
pref.verbose = verbose
if args.number is not None:
    pref.boards = args.number
pref.separatorCSV = args.separator

if args.variant is not None:
    pref.pcbConfig = args.variant
print("PCB variant:", pref.pcbConfig)


#write preference file back out (first run will generate a file with default preferences)
if not have_cfile:
    pref.Write(config_file)
    say("Writing preferences file %s"%(config_file,))

#individual components
components = []

#component groups
groups = []

#read out the netlist