And now, here's the main content of this page:
PyCell Studio Code at Work
The PyCell example code below, simplified for readability, builds a portion of a simple transistor. The first line creates a polysilicon gate rectangle. The next lines create source and drain contacts, and then use the fgPlace() method to place these contacts "as close as possible" to this gate rectangle.
The next PyCell example code shown below builds a mirrored pair of transistors. The first two lines create these transistors, the third line mirrors one transistor, and the fourth line places these transistors "as close as possible." The fifth line then connects the source and drain pins together.

These examples illustrate the power of the Ciranova approach: separate design rule management code from code describing the intention of the layout.