SLiCAP.py¶
Main module for running SLiCAP from a console or from within a Python IDE.
When working with Jupyter notebooks the main imort module is SLiCAPnotebook.py. It will import SLiCAP.py and some extra modules for displaying LaTeX, SVG and RST in the Jupyter notebooks.
-
class
SLiCAPproject(name)¶ Prototype of a SLiCAPproject.
SLiCAPproject.author (str) Will be updated by running: SLiCAPproject.initProject(<name>)
-
lastUpdate= None¶ SLiCAPproject.lastUpdate (datetime.datetime) will be updated by running: SLiCAPproject.initProject(<name>)
-
name= None¶ SLiCAPproject.name (str) is the name of the project. It will appear on the main html index page
-
initProject(name, firstRun=True)¶ Initializes a SLiCAP project.
- Copies the directory structure from the templates subdirectory to the project directory in the case it has not yet been created.
- Creates index.html in the html directory with the project name in the title bar
- Compiles the system libraries
- Creates or updates ‘SLiCAPconfig.py’ in the project directory
- Creates instance of SLiCAPproject object
Parameters: name (str) – Name of the project will be passed to an instance of the SLiCAPproject object. Returns: SLiCAPproject Return type: SLiCAP.SLiCAPproject Example: >>> prj = initProject('my first SLiCAP project') >>> print prj.author anton
-
makeNetlist(fileName, cirTitle)¶ Creates a netlist from a schematic file generated with LTspice or gschem.
- LTspice: ‘.asc’ file
- gschem: ‘.sch’ file
Parameters: - fileName (str) – Name of the file, relative to ini.circuitPath
- cirTitle (str) – Title of the schematic.