def ls(self, line): system(self.git_call, 'status ' + line)
def edit(self, line): system(editor, line)
def git(self, line): system(self.git_call, line)
# EXAMPLE ############################################################ if __name__ == "__main__": from sys import version as pythonVersion print("file: clock.py") print("content: clock device") print("created: 2021 March 14 Sunday") print("author: Roch Schanen") print("comment:") print("run python3:" + pythonVersion) from core import system # build system S = system("version 0.00") S.add(clock()) # clk 0 S.add(clock(shift=11, count=3)) # clk 1 S.add(clock(shift=9, count=3)) # clk 2 S.add(clock(55, 10, 30, None)) # clk 3 S.add(clock(55, 10, 30, 2)) # clk 4 S.add(clock(width=9, shift=10, count=3)) # simulate S.displayDevices() S.openFile() S.runUntil(200) S.closeFile()
def cd(self, line): system(self.git_call, 'checkout ' + line)
from __future__ import division import core system = core.system('S.I.') m = core.base_unit('length', 'meter', 'm', system) kg = core.base_unit('mass', 'kilogram', 'kg', system) s = core.base_unit('time', 'second', 's', system) A = core.base_unit('electric current', 'ampere', 'A', system) K = core.base_unit('thermodynamic temperature ', 'kelvin', 'K', system) mol = core.base_unit('amount of substance', 'mole', 'mol', system) cd = core.base_unit('luminous intensity', 'candela', 'cd', system) no_unit = core.none_unit('no unit', '') none = core.none_unit('no unit', '') named = core.named_unit #SI prefixes def deca(unit): """si prefix""" return core.factor_unit(10., unit, name='deca' + unit.name, symbol='da' + unit.symbol) def hecto(unit): """si prefix""" return core.factor_unit(100.,