[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnucap-devel] python bindings update

From: Felix Salfelder
Subject: Re: [Gnucap-devel] python bindings update
Date: Fri, 28 Dec 2018 22:26:46 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Fri, Dec 28, 2018 at 08:55:37PM +0100, Patrick Mulder wrote:
> yes, that works very nicely. Maybe for interactive sessions, it might be
> nice to have:
> gnucap.list()
> wrapper, but very low prio, as the cmd("..") syntax works nicely already.

it's not clear, how to (consistently) wrap commands into python
functions. argument parsing and output redirection is not as consistent
as you might expect. perhaps it will stay like this for some time.

more within reach, the lower level functionality: build your own list.

# pseudocode!
L = gnucap.lang["verilog"]
for i in gnucap.circuit():

> I was able to run the gnucap python package in Python 2, for Python 3 (
> which i use for Jupyter i get this, probably I am missing a build step to
> build the module for Python3:
> $ python3
> [..]
> Traceback (most recent call last):
>   File "/home/patrick/projects/gnucap/gnucap-python/gnucap/",
> line 14, in swig_import_helper
> [..]
> ImportError:
> /home/patrick/projects/gnucap/gnucap-python/gnucap/
> undefined symbol: PyCObject_Type

I do not remember this particular error. but it is meant to work
directly from the builddir.

your best bet is "make check", if the checks pass, have a close look at
the environment variables.

> ModuleNotFoundError: No module named '_gnucap_swig'

could be related to PYTHONPATH. but as you found, there are differences
between python versions, fingers crossed. LD_LIBRARY_PATH can also break
your neck.

> PS I am taking some notes in a gitbook
> - will try to extend it "peu a
> peu". Also, will try to play with diode, and DC sweeps for a transistor
> next.

nice. there's now a link to these pages in the gnucap wiki. NB: you may
certainly use that as well, if you'd like. Ask Al for access.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]