Ejemplo n.º 1
0
    def __init__(self, symbol_dirs=None):
        """ Constructs a new GEDA object and initialises it. *symbol_dirs*
            expects a list of directories. It will search for .sym files
            in all the specified directories.
        """

        if symbol_dirs is None:
            symbol_dirs = []

        symbol_dirs = symbol_dirs + \
            [os.path.join(os.path.dirname(__file__), '..',
                          'library', 'geda')]

        self.known_symbols = find_symbols(symbol_dirs)

        ## offset used as bottom left origin as default
        ## in gEDA when starting new file
        self.offset = Point(0, 0)
        self.component_library = None

        ##NOTE: special attributes that are processed
        ## separately and will not be used as regular attributes
        self.ignored_attributes = [
            '_prefix',
            '_suffix',
            '_refdes',
            '_name',
            '_geda_imported',
        ]

        self.project_dirs = {
            'symbol': None,
            'project': None,
        }
Ejemplo n.º 2
0
    def __init__(self, symbol_dirs=None):
        """ Constructs a new GEDA object and initialises it. *symbol_dirs*
            expects a list of directories. It will search for .sym files
            in all the specified directories.
        """

        if symbol_dirs is None:
            symbol_dirs = []

        symbol_dirs = symbol_dirs + \
            [os.path.join(os.path.dirname(__file__), '..',
                          'library', 'geda')]

        self.known_symbols = find_symbols(symbol_dirs)

        ## offset used as bottom left origin as default
        ## in gEDA when starting new file
        self.offset = Point(0, 0)
        self.component_library = None

        ##NOTE: special attributes that are processed
        ## separately and will not be used as regular attributes
        self.ignored_attributes = [
            '_prefix',
            '_suffix',
            '_refdes',
            '_name',
            '_geda_imported',
        ]

        self.project_dirs = {
            'symbol': None,
            'project': None,
        }
    def __init__(self, symbol_dirs=None):
        """ Constructs a new GEDA object and initialises it. *symbol_dirs*
            expects a list of directories. It will search for .sym files
            in all the specified directories.
        """

        if symbol_dirs is None:
            symbol_dirs = []

        symbol_dirs = symbol_dirs + [os.path.join(os.path.dirname(__file__), "..", "library", "geda")]

        self.known_symbols = find_symbols(symbol_dirs)

        ## offset used as bottom left origin as default
        ## in gEDA when starting new file
        self.offset = Point(0, 0)
        self.component_library = None

        ##NOTE: special attributes that are processed
        ## separately and will not be used as regular attributes
        self.ignored_attributes = ["_prefix", "_suffix", "_geda_imported"]
        self.ignored_annotations = self.ignored_attributes + ["name", "refdes"]
        self.project_dirs = {"symbol": None, "project": None}

        self.component_names = []