Re: [myhdl-list] Re: Library of components in seperate folders
Brought to you by:
jandecaluwe
From: George P. <ge...@ga...> - 2005-12-16 13:35:22
|
Thanks Jan, I can try that. However, I'd rather not have to set any environment variables. Are there other ways to accomplish this, as well? George > 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 > |