Updated KLayout Python Module Prototype (markdown)

Matthias Köfferlein 2018-06-24 21:03:27 +02:00
parent 95bdd12dac
commit 75cdca3567
1 changed files with 22 additions and 1 deletions

@ -5,7 +5,28 @@ Binary packages and documentation for the branch are available here: [http://www
## Building
The `klayout` module will be built together with KLayout. After KLayout installation, the `klayout` module resides inside the installation tree. To use it, either copy the `klayout` folder to your Python installation or set `PYTHONPATH` to the location of the `klayout` folder.
For building use the build script:
```
# From the project's root directory
./build.sh -bin <your-installation-path>
```
For "<your-installation-path>" pick a destination where you want KLayout to be installed. For example you can use "/usr/local/klayout" for the destination, but you will need sudo permissions then:
```
# Build and install in /usr/local/klayout
sudo ./build.sh -bin /usr/local/klayout
```
The `klayout` module will be built together with KLayout. After KLayout installation, the `klayout` module resides inside the installation tree in the "pymod" subfolder. To use it, either copy the `klayout` folder to your Python installation or set `PYTHONPATH` to the location of the `klayout` folder:
```
export PYTHONPATH=<your-installation-path>/pymod
python
>>> import klayout.db as db
>>> print(str(db.DBox(0, 0, 100, 200))
```
## Using the module