LibreOffice Module librelogo (master)  1
Classes | Functions | Variables
LibreLogo Namespace Reference

Classes

class  __Doc__
 
class  LogoProgram
 

Functions

def __trace__ ()
 
def __l12n__ (lng)
 
def __getprop__ (name, value)
 
def __gendots__ (n)
 
def __getdocument__ ()
 
def Input (s)
 
def __string__
 
def Print (s)
 
def MessageBox
 
def Random (r)
 
def to_ascii (s)
 
def to_unicode (s)
 
def __locname__
 
def __getcursor__ (fulltext)
 
def __translate__
 
def __is_alive__ ()
 
def __encodestring__ (m)
 
def __encodecomment__ (m)
 
def __decodestring__ (m)
 
def __decodestring2__ (m)
 
def __decodecomment__ (m)
 
def __initialize__ ()
 
def pagesize
 
def turtlehome ()
 
def __pen__ (n)
 
def __visible__
 
def hideturtle ()
 
def showturtle ()
 
def left
 
def right
 
def goforward
 
def gobackward
 
def commandline
 
def __setlang__ ()
 
def run
 
def stop
 
def home
 
def clearscreen
 
def __checkhalt__ ()
 
def __cs__
 
def __dispatcher__
 
def __getshape__ (shapename)
 
def __angle__ (deg)
 
def turnleft (deg)
 
def turnright (deg)
 
def heading
 
def rotate (shapename, deg)
 
def forward (n)
 
def backward (n)
 
def __dots__
 
def __draw__
 
def __zoom__ ()
 
def __lefthang__ (shape)
 
def __go__
 
def __fillit__
 
def point ()
 
def __boxshape__ (shapetype, l)
 
def ellipse (l)
 
def rectangle (l)
 
def label (st)
 
def text (shape, st)
 
def sleep (t)
 
def __removeshape__ (shapename)
 
def __fontweight__ (w)
 
def __fontstyle__ (w)
 
def __color__ (c)
 
def __linestyle__ (s)
 
def fillstyle (s)
 
def __splitcolor__
 
def __componentcolor__ (c)
 
def pencolor
 
def pensize
 
def penstyle
 
def penjoint
 
def pencap
 
def fillcolor
 
def filltransparency
 
def pentransparency
 
def fontcolor
 
def position
 
def __groupstart__
 
def create_svg_animation (m)
 
def create_valid_svg_file (filename)
 
def __groupend__
 
def __int__ (x)
 
def __float__ (x)
 
def fontheight
 
def fontweight
 
def fontfamily
 
def fontstyle
 
def __loadlang__ (lang, a)
 
def __concatenation__ (r)
 
def __l2p__ (i, par, insub, inarray)
 
def __compil__ (s)
 
def __gotoline__ (n)
 

Variables

tuple next = lambdal:l.next()
 
dictionary __lng__ = {}
 
tuple __lngpath__ = re.sub(r"^vnd.sun.star.pathname:(.*)program(/|\\)fundamental([.]ini|rc)$", "\\1", urebootstrap)
 
string __translang__ = "am|ca|cs|de|dk|el|en|eo|es|et|fr|hu|it|ja|nl|no|pl|pt|ru|se|sl"
 
dictionary __docs__ = {}
 
 __prevcode__ = None
 
 __prevlang__ = None
 
 __prevcompiledcode__ = None
 
 __thread__ = None
 
tuple __lock__ = threading.Lock()
 
 __halt__ = False
 
string __compiled__ = ""
 
int __group__ = 0
 
list __groupstack__ = []
 
int __grouplefthang__ = 0
 
dictionary __comp__ = {}
 
list __strings__ = []
 
dictionary __colors__ = {}
 
list __COLORS__ = ['BLACK', 0x000000]
 
list __NORMCOLORS__
 
list __STRCONST__ = [i[0] for i in __COLORS__]
 
int __SLEEP_SLICE_IN_MILLISECONDS__ = 500
 
int __PT_TO_TWIP__ = 20
 
int __MM_TO_PT__ = 1
 
int __MM10_TO_TWIP__ = 1
 
int __FILLCOLOR__ = 0x8000cc00
 
float __LINEWIDTH__ = 0.5
 
string __ENCODED_STRING__ = "_s_%s___"
 
string __ENCODED_COMMENT__ = "_c_%s___"
 
string __DECODE_STRING_REGEX__ = "_s_([0-9]+)___"
 
string __DECODE_COMMENT_REGEX__ = "_c_([0-9]+)___"
 
string __LINEBREAK__ = "#_@L_i_N_e@_#"
 
string __TURTLE__ = "turtle"
 
string __ACTUAL__ = "actual"
 
string __BASEFONTFAMILY__ = "Linux Biolinum G"
 
int __LineStyle_DOTTED__ = 2
 
tuple __uilocale__ = uno.getComponentContext()
 
tuple __bezierdot__ = __Bezier__()
 
list __TURTLESHAPE__
 
 g_exportedScripts = left,right,goforward,gobackward,run,stop,home,clearscreen,commandline,__translate__
 
dictionary __lng_fallback__
 

Function Documentation

def LibreLogo.__angle__ (   deg)

Definition at line 895 of file LibreLogo.py.

Referenced by turnleft(), and turnright().

def LibreLogo.__boxshape__ (   shapetype,
  l 
)
def LibreLogo.__checkhalt__ ( )

Definition at line 857 of file LibreLogo.py.

Referenced by __fillit__(), Input(), Print(), and sleep().

def LibreLogo.__color__ (   c)

Definition at line 1325 of file LibreLogo.py.

References __componentcolor__().

Referenced by fillcolor(), fillstyle(), fontcolor(), and pencolor().

def LibreLogo.__compil__ (   s)

Definition at line 1859 of file LibreLogo.py.

References __l12n__(), __l2p__(), __loadlang__(), __trace__(), and to_ascii().

Referenced by run().

def LibreLogo.__componentcolor__ (   c)

Definition at line 1398 of file LibreLogo.py.

Referenced by __color__(), fillcolor(), fontcolor(), and pencolor().

def LibreLogo.__concatenation__ (   r)

Definition at line 1769 of file LibreLogo.py.

def LibreLogo.__cs__ (   select = True)

Definition at line 864 of file LibreLogo.py.

References __dispatcher__(), __getshape__(), and __visible__().

Referenced by clearscreen().

def LibreLogo.__decodecomment__ (   m)

Definition at line 592 of file LibreLogo.py.

def LibreLogo.__decodestring2__ (   m)

Definition at line 589 of file LibreLogo.py.

References __l12n__().

def LibreLogo.__decodestring__ (   m)

Definition at line 586 of file LibreLogo.py.

def LibreLogo.__dispatcher__ (   s,
  properties = (),
  doc = 0 
)
def LibreLogo.__dots__ (   n,
  pos,
  dx,
  dy,
  r = -1,
  q = 0 
)

Definition at line 960 of file LibreLogo.py.

Referenced by __go__(), ellipse(), and rectangle().

def LibreLogo.__draw__ (   d,
  count = True 
)

Definition at line 974 of file LibreLogo.py.

References __visible__(), __zoom__(), and next.

Referenced by __boxshape__(), __fillit__(), and __go__().

def LibreLogo.__encodecomment__ (   m)

Definition at line 582 of file LibreLogo.py.

def LibreLogo.__encodestring__ (   m)

Definition at line 577 of file LibreLogo.py.

def LibreLogo.__fillit__ (   filled = True)
def LibreLogo.__float__ (   x)

Definition at line 1617 of file LibreLogo.py.

Referenced by __int__().

def LibreLogo.__fontstyle__ (   w)

Definition at line 1316 of file LibreLogo.py.

References __l12n__().

Referenced by text().

def LibreLogo.__fontweight__ (   w)

Definition at line 1307 of file LibreLogo.py.

References __l12n__().

Referenced by text().

def LibreLogo.__gendots__ (   n)

Definition at line 234 of file LibreLogo.py.

def LibreLogo.__getcursor__ (   fulltext)

Definition at line 381 of file LibreLogo.py.

Referenced by __translate__(), clearscreen(), and run().

def LibreLogo.__getdocument__ ( )

Definition at line 246 of file LibreLogo.py.

Referenced by __initialize__(), __translate__(), clearscreen(), home(), and run().

def LibreLogo.__getprop__ (   name,
  value 
)

Definition at line 225 of file LibreLogo.py.

Referenced by __groupend__(), and __translate__().

def LibreLogo.__getshape__ (   shapename)
def LibreLogo.__go__ (   shapename,
  n,
  dot = False,
  preciseAngle = -1 
)
def LibreLogo.__gotoline__ (   n)

Definition at line 2020 of file LibreLogo.py.

References __dispatcher__().

Referenced by LibreLogo.LogoProgram.run().

def LibreLogo.__groupend__ (   name = "")
def LibreLogo.__groupstart__ (   name = "")

Definition at line 1517 of file LibreLogo.py.

References __removeshape__(), and uno.getComponentContext().

Referenced by ellipse(), and rectangle().

def LibreLogo.__initialize__ ( )
def LibreLogo.__int__ (   x)

Definition at line 1612 of file LibreLogo.py.

References __float__().

def LibreLogo.__is_alive__ ( )

Definition at line 574 of file LibreLogo.py.

def LibreLogo.__l12n__ (   lng)
def LibreLogo.__l2p__ (   i,
  par,
  insub,
  inarray 
)

Definition at line 1781 of file LibreLogo.py.

Referenced by __compil__().

def LibreLogo.__lefthang__ (   shape)

Definition at line 997 of file LibreLogo.py.

Referenced by __boxshape__(), and __go__().

def LibreLogo.__linestyle__ (   s)

Definition at line 1357 of file LibreLogo.py.

Referenced by __boxshape__(), __fillit__(), and __go__().

def LibreLogo.__loadlang__ (   lang,
  a 
)

Definition at line 1648 of file LibreLogo.py.

References next.

Referenced by __compil__().

def LibreLogo.__locname__ (   name,
  l = -1 
)

Definition at line 373 of file LibreLogo.py.

References __l12n__(), and to_unicode().

Referenced by __string__(), pencap(), penjoint(), penstyle(), and LibreLogo.LogoProgram.run().

def LibreLogo.__pen__ (   n)

Definition at line 656 of file LibreLogo.py.

References __getshape__().

Referenced by __fillit__(), and __initialize__().

def LibreLogo.__removeshape__ (   shapename)

Definition at line 1301 of file LibreLogo.py.

Referenced by __boxshape__(), __fillit__(), __go__(), __groupend__(), __groupstart__(), home(), and sleep().

def LibreLogo.__setlang__ ( )

Definition at line 749 of file LibreLogo.py.

References __l12n__().

Referenced by __translate__(), and run().

def LibreLogo.__splitcolor__ (   c,
  shape = None,
  angle = None 
)
def LibreLogo.__string__ (   s,
  decimal = None 
)

Definition at line 318 of file LibreLogo.py.

References __locname__().

Referenced by Print(), and text().

def LibreLogo.__trace__ ( )

Definition at line 22 of file LibreLogo.py.

Referenced by __compil__(), __l12n__(), Input(), LibreLogo.LogoProgram.run(), and run().

def LibreLogo.__translate__ (   arg = None)
def LibreLogo.__visible__ (   shape,
  visible = -1 
)
def LibreLogo.__zoom__ ( )

Definition at line 990 of file LibreLogo.py.

Referenced by __draw__().

def LibreLogo.backward (   n)

Definition at line 953 of file LibreLogo.py.

References __go__(), forward(), and turnright().

Referenced by gobackward().

def LibreLogo.clearscreen (   arg = None)
def LibreLogo.commandline (   arg = None,
  arg2 = None 
)

Definition at line 746 of file LibreLogo.py.

References run().

def LibreLogo.create_svg_animation (   m)

Definition at line 1530 of file LibreLogo.py.

def LibreLogo.create_valid_svg_file (   filename)

Definition at line 1541 of file LibreLogo.py.

Referenced by __groupend__().

def LibreLogo.ellipse (   l)
def LibreLogo.fillcolor (   n = -1)
def LibreLogo.fillstyle (   s)

Definition at line 1368 of file LibreLogo.py.

References __color__(), and __splitcolor__().

def LibreLogo.filltransparency (   n = -1)

Definition at line 1475 of file LibreLogo.py.

References fillcolor().

def LibreLogo.fontcolor (   n = -1)

Definition at line 1497 of file LibreLogo.py.

References __color__(), and __componentcolor__().

def LibreLogo.fontfamily (   s = -1)

Definition at line 1636 of file LibreLogo.py.

def LibreLogo.fontheight (   n = -1)

Definition at line 1624 of file LibreLogo.py.

def LibreLogo.fontstyle (   n = -1)

Definition at line 1642 of file LibreLogo.py.

def LibreLogo.fontweight (   n = -1)

Definition at line 1630 of file LibreLogo.py.

def LibreLogo.forward (   n)

Definition at line 933 of file LibreLogo.py.

References __getshape__(), __go__(), heading(), label(), and position().

Referenced by backward(), and goforward().

def LibreLogo.gobackward (   arg = None)

Definition at line 736 of file LibreLogo.py.

References __getshape__(), __initialize__(), backward(), and uno.getComponentContext().

def LibreLogo.goforward (   arg = None)

Definition at line 726 of file LibreLogo.py.

References __getshape__(), __initialize__(), forward(), and uno.getComponentContext().

def LibreLogo.heading (   deg = -1,
  go = False 
)

Definition at line 906 of file LibreLogo.py.

References __getshape__(), and __go__().

Referenced by __fillit__(), __splitcolor__(), forward(), label(), and position().

def LibreLogo.hideturtle ( )

Definition at line 677 of file LibreLogo.py.

References __dispatcher__(), __getshape__(), and __visible__().

def LibreLogo.home (   arg = None)
def LibreLogo.Input (   s)

Definition at line 256 of file LibreLogo.py.

References __checkhalt__(), __trace__(), and uno.getComponentContext().

def LibreLogo.label (   st)

Definition at line 1251 of file LibreLogo.py.

References __getshape__(), heading(), position(), rectangle(), and text().

Referenced by forward().

def LibreLogo.left (   arg = None)

Definition at line 706 of file LibreLogo.py.

References __getshape__(), __initialize__(), uno.getComponentContext(), and rotate().

def LibreLogo.MessageBox (   parent,
  message,
  title,
  msgtype = "messbox",
  buttons = __OK__ 
)

Definition at line 344 of file LibreLogo.py.

Referenced by Print(), LibreLogo.LogoProgram.run(), and run().

def LibreLogo.pagesize (   n = -1)

Definition at line 635 of file LibreLogo.py.

Referenced by position().

def LibreLogo.pencap (   n = -1)

Definition at line 1451 of file LibreLogo.py.

References __l12n__(), and __locname__().

def LibreLogo.pencolor (   n = -1)
def LibreLogo.penjoint (   n = -1)

Definition at line 1439 of file LibreLogo.py.

References __l12n__(), and __locname__().

def LibreLogo.pensize (   n = -1)

Definition at line 1413 of file LibreLogo.py.

References __getshape__(), and __visible__().

Referenced by showturtle().

def LibreLogo.penstyle (   n = -1)

Definition at line 1424 of file LibreLogo.py.

References __l12n__(), and __locname__().

def LibreLogo.pentransparency (   n = -1)

Definition at line 1489 of file LibreLogo.py.

References pencolor().

def LibreLogo.point ( )

Definition at line 1146 of file LibreLogo.py.

References __go__(), and position().

Referenced by ellipse(), and rectangle().

def LibreLogo.position (   n = -1)

Definition at line 1503 of file LibreLogo.py.

References __getshape__(), heading(), and pagesize().

Referenced by __fillit__(), forward(), label(), and point().

def LibreLogo.Print (   s)

Definition at line 336 of file LibreLogo.py.

References __checkhalt__(), __string__(), and MessageBox().

def LibreLogo.Random (   r)

Definition at line 361 of file LibreLogo.py.

def LibreLogo.rectangle (   l)

Definition at line 1217 of file LibreLogo.py.

References __boxshape__(), __dots__(), __getshape__(), __groupend__(), __groupstart__(), and point().

Referenced by label().

def LibreLogo.right (   arg = None)

Definition at line 716 of file LibreLogo.py.

References __getshape__(), __initialize__(), uno.getComponentContext(), and rotate().

def LibreLogo.rotate (   shapename,
  deg 
)

Definition at line 928 of file LibreLogo.py.

References __getshape__().

Referenced by left(), right(), turnleft(), and turnright().

def LibreLogo.run (   arg = None,
  arg2 = -1 
)
def LibreLogo.showturtle ( )
def LibreLogo.sleep (   t)

Definition at line 1292 of file LibreLogo.py.

References __checkhalt__(), and __removeshape__().

def LibreLogo.stop (   arg = None)

Definition at line 818 of file LibreLogo.py.

def LibreLogo.text (   shape,
  st 
)

Definition at line 1280 of file LibreLogo.py.

References __fontstyle__(), __fontweight__(), __splitcolor__(), and __string__().

Referenced by label().

def LibreLogo.to_ascii (   s)

Definition at line 367 of file LibreLogo.py.

Referenced by __compil__().

def LibreLogo.to_unicode (   s)

Definition at line 370 of file LibreLogo.py.

Referenced by __locname__(), and LibreLogo.LogoProgram.run().

def LibreLogo.turnleft (   deg)

Definition at line 900 of file LibreLogo.py.

References __angle__(), and rotate().

def LibreLogo.turnright (   deg)

Definition at line 903 of file LibreLogo.py.

References __angle__(), and rotate().

Referenced by backward().

def LibreLogo.turtlehome ( )

Definition at line 642 of file LibreLogo.py.

References __getshape__(), and __splitcolor__().

Referenced by __initialize__().

Variable Documentation

string LibreLogo.__ACTUAL__ = "actual"

Definition at line 141 of file LibreLogo.py.

string LibreLogo.__BASEFONTFAMILY__ = "Linux Biolinum G"

Definition at line 142 of file LibreLogo.py.

tuple LibreLogo.__bezierdot__ = __Bezier__()

Definition at line 236 of file LibreLogo.py.

dictionary LibreLogo.__colors__ = {}

Definition at line 114 of file LibreLogo.py.

list LibreLogo.__COLORS__ = ['BLACK', 0x000000]

Definition at line 115 of file LibreLogo.py.

dictionary LibreLogo.__comp__ = {}

Definition at line 112 of file LibreLogo.py.

string LibreLogo.__compiled__ = ""

Definition at line 108 of file LibreLogo.py.

string LibreLogo.__DECODE_COMMENT_REGEX__ = "_c_([0-9]+)___"

Definition at line 138 of file LibreLogo.py.

string LibreLogo.__DECODE_STRING_REGEX__ = "_s_([0-9]+)___"

Definition at line 137 of file LibreLogo.py.

dictionary LibreLogo.__docs__ = {}

Definition at line 101 of file LibreLogo.py.

string LibreLogo.__ENCODED_COMMENT__ = "_c_%s___"

Definition at line 136 of file LibreLogo.py.

string LibreLogo.__ENCODED_STRING__ = "_s_%s___"

Definition at line 135 of file LibreLogo.py.

int LibreLogo.__FILLCOLOR__ = 0x8000cc00

Definition at line 133 of file LibreLogo.py.

int LibreLogo.__group__ = 0

Definition at line 109 of file LibreLogo.py.

int LibreLogo.__grouplefthang__ = 0

Definition at line 111 of file LibreLogo.py.

list LibreLogo.__groupstack__ = []

Definition at line 110 of file LibreLogo.py.

LibreLogo.__halt__ = False

Definition at line 107 of file LibreLogo.py.

string LibreLogo.__LINEBREAK__ = "#_@L_i_N_e@_#"

Definition at line 139 of file LibreLogo.py.

int LibreLogo.__LineStyle_DOTTED__ = 2

Definition at line 143 of file LibreLogo.py.

float LibreLogo.__LINEWIDTH__ = 0.5

Definition at line 134 of file LibreLogo.py.

dictionary LibreLogo.__lng__ = {}

Definition at line 20 of file LibreLogo.py.

dictionary LibreLogo.__lng_fallback__

Definition at line 2034 of file LibreLogo.py.

string LibreLogo.__lngpath__ = re.sub(r"^vnd.sun.star.pathname:(.*)program(/|\\)fundamental([.]ini|rc)$", "\\1", urebootstrap)

Definition at line 92 of file LibreLogo.py.

tuple LibreLogo.__lock__ = threading.Lock()

Definition at line 106 of file LibreLogo.py.

int LibreLogo.__MM10_TO_TWIP__ = 1

Definition at line 132 of file LibreLogo.py.

int LibreLogo.__MM_TO_PT__ = 1

Definition at line 131 of file LibreLogo.py.

list LibreLogo.__NORMCOLORS__
Initial value:
1 = [[[255, 255, 0], 0, -11, 1, -11],
2  [[255, 128, 0], 1, 116, 1, -33], [[255, 0, 0], 1, 95, 2, 42],
3  [[255, 0, 255], 2, -213, 0, -106], [[0, 0, 255], 0, 148, 1, 127],
4  [[0, 255, 255], 1, -128, 2, -63], [[0, 255, 0], 2, 192, 0, 244]]

Definition at line 124 of file LibreLogo.py.

LibreLogo.__prevcode__ = None

Definition at line 102 of file LibreLogo.py.

LibreLogo.__prevcompiledcode__ = None

Definition at line 104 of file LibreLogo.py.

LibreLogo.__prevlang__ = None

Definition at line 103 of file LibreLogo.py.

int LibreLogo.__PT_TO_TWIP__ = 20

Definition at line 130 of file LibreLogo.py.

int LibreLogo.__SLEEP_SLICE_IN_MILLISECONDS__ = 500

Definition at line 129 of file LibreLogo.py.

list LibreLogo.__STRCONST__ = [i[0] for i in __COLORS__]

Definition at line 128 of file LibreLogo.py.

list LibreLogo.__strings__ = []

Definition at line 113 of file LibreLogo.py.

LibreLogo.__thread__ = None

Definition at line 105 of file LibreLogo.py.

string LibreLogo.__translang__ = "am|ca|cs|de|dk|el|en|eo|es|et|fr|hu|it|ja|nl|no|pl|pt|ru|se|sl"

Definition at line 100 of file LibreLogo.py.

string LibreLogo.__TURTLE__ = "turtle"

Definition at line 140 of file LibreLogo.py.

list LibreLogo.__TURTLESHAPE__
Initial value:
1 = [tuple([(__Point__(-120, 130), __Point__(-245, 347), __Point__(-291, 176), ), (__Point__(0, -500), __Point__(126, -375), __Point__(0, -250), __Point__(-124, -375), ), (__Point__(295, 170), __Point__(124, 124), __Point__(250, 340), ), (__Point__(466, -204), __Point__(224, -269), __Point__(71, -180), __Point__(313, -116), ), (__Point__(-75, -175), __Point__(-292, -300), __Point__(-417, -83), ), (__Point__(250, 0), __Point__(0, -250), __Point__(-250, 0), __Point__(0, 250), )] +
2  [(i,) for i in __gendots__(32)] + # single points for wider selection
3  [(__Point__(0, 0),)]), # last point for position handling
4  ((__Point__(0, 0),),)]
def __gendots__(n)
Definition: LibreLogo.py:234

Definition at line 241 of file LibreLogo.py.

tuple LibreLogo.__uilocale__ = uno.getComponentContext()

Definition at line 229 of file LibreLogo.py.

Definition at line 2030 of file LibreLogo.py.

tuple LibreLogo.next = lambdal:l.next()

Definition at line 16 of file LibreLogo.py.

Referenced by __draw__(), and __loadlang__().