[myhdl-list] Re: Library of components in seperate folders
Brought to you by:
jandecaluwe
From: Jan D. <ja...@ja...> - 2005-12-16 10:49:13
|
George Pantazopoulos wrote: > Hi all, > > I'd like to have a directory structure similar to the diagram below. I'd > like to build a component library where each component and its unit test > reside in its own directory. From outside the library directory I'd > like to be able to import components into projects that integrate the > various library components. (eg. computer.py would use the fifo, ram, > and uart primitives). > > Can this be done with python? If so, what is a good, clean, and flexible > way to accomplish this? I'd like to avoid specifying any kind of path > name in the .py files, if possible. You can use the library as a hierarchical Python package structure, by adding __init__.py files to the (sub)directories, and adding the top directory path to the PYTHONPATH environment variable. Jan -- Jan Decaluwe - Resources bvba - http://www.jandecaluwe.com Losbergenlaan 16, B-3010 Leuven, Belgium From Python to silicon: http://myhdl.jandecaluwe.com |