Пример #1
0
def read_arrows(filename):
    arrows = []
    def arrow(path, closed, list = arrows):
        list.append(Arrow(path, closed))
    dict = {'arrow': arrow}

    read_resource_file(filename, '##Sketch Arrow 0',
                       _("%s is not an arrow definition file"), dict)

    return arrows
Пример #2
0
def read_arrows(filename):
    arrows = []
    def arrow(path, closed, list = arrows):
	list.append(Arrow(path, closed))
    dict = {'arrow': arrow}

    read_resource_file(filename, '##Sketch Arrow 0',
		       _("%s is not an arrow definition file"), dict)

    return arrows
Пример #3
0
def StandardDashes():
    global std_dashes
    if std_dashes is None:
	filename = os.path.join(config.std_res_dir, config.preferences.dashes)
	try:
	    std_dashes = []
	    read_resource_file(filename, '##Sketch Dashes 0',
			       _("%s is not dashes file"),
			       {'dashes': std_dashes.append})
	except:
	    warn_tb(USER, _("Error trying to read dashes from %s\n"
                            "Using builtin defaults"), filename)
	    std_dashes = [(), (5, 5)]
    return std_dashes
Пример #4
0
def StandardDashes():
    global std_dashes
    if std_dashes is None:
        filename = os.path.join(config.std_res_dir, config.preferences.dashes)
        try:
            std_dashes = []
            read_resource_file(filename, '##Sketch Dashes 0',
                               _("%s is not dashes file"),
                               {'dashes': std_dashes.append})
        except:
            warn_tb(USER, _("Error trying to read dashes from %s\n"
                            "Using builtin defaults"), filename)
            std_dashes = [(), (5, 5)]
    return std_dashes