import robin, stl import os.path robin.loadLibrary(__name__, os.path.join(robin.here(__file__), "libmemprof.so"))
import robin, stl import os.path robin.loadLibrary(__name__, os.path.join(robin.here(__file__), "libinheritance.so"))
import robin, stl import os.path robin.loadLibrary(__name__, os.path.join(os.path.dirname(__file__), "libautocollect.so"))
import robin import os robin.loadLibrary("easy", os.path.join(os.path.dirname(__file__), "./libeasy.so")) BYTE.__to__ = lambda x: ord(x.as())
import robin, stl robin.loadLibrary(__name__, "./libprotocols.so") Times.__getitem__ = "mul" Times.__setitem__ = "triangle" Times.__delitem__ = "omit"
import robin, stl import os.path robin.loadLibrary(__name__, os.path.join(robin.here(__file__), "liblanguage.so"))
import robin, os if os.path.islink(__file__): __file__ = os.readlink(__file__) here = os.path.dirname(__file__) machine = os.getenv("MACHINE") soext = 'so' lib = os.path.join(here, "lib/%s/numpy_robin.%s") robin.loadLibrary(__name__, lib % (machine, soext)) engage()
from __future__ import generators import robin, os.path import __builtin__ if os.path.islink(__file__): __file__ = os.readlink(__file__) here = os.path.dirname(__file__) machine = os.getenv("MACHINE") libtemplate = "%(sopre)s%%s%(platspec)s-%(ver)s%(pyspec)s%(soext)s" lib = libtemplate % robin.__dict__ % "robin_stl" robin.loadLibrary(__name__, robin.locate(__file__, lib)) ostringstream = std.ostringstream istringstream = std.istringstream ifstream = std.ifstream ofstream = std.ofstream string = std.string string.__to__ = str truetype = { double: float, long: int, ulong: int, uint: int, \ char: str, uchar: str, schar: str, longlong: long, ulonglong: long} def _sum_tuples(tuplelst): sumlst = [0 for i in tuplelst[0]] for curtuple in tuplelst: for i in range(len(curtuple)): sumlst[i] = sumlst[i] + curtuple[i] return tuple(sumlst) def _make_vector_functor(vectype, volatile = False): def make_any_vector(lst, vectype = vectype):
import robin, stl robin.loadLibrary(__name__, "./libscribble.so")
import robin, stl import os.path robin.loadLibrary(__name__, os.path.join(robin.here(__file__), "libtemplates.so"))
import robin, stl import os robin.loadLibrary(__name__, os.path.join(os.path.dirname(__file__), "./libscribble.so")) s = Scribble() import thread thread.start_new(s.run, ()) def nice_sine(i): import math return int(math.sin(i/20.) * 50 + 120) def mkpoint(x, y): p = Point[int]() p.x = x p.y = y return p Point[int].__repr__ = lambda p: "%i,%i" % (p.x,p.y) Point[int].__from__[()] = lambda (x,y): mkpoint(x,y) class Trace(IPointContainer): def __init__(self): self.points = [] def clear(self): self.points = [] def add(self, i): self.points.append((i.x, i.y))