Quick intro to Python

  • Already on linux and Mac OS X. Small download for windows.
  • First use as a calculator (processing numbers to/from the tty)
    • compare gcalctool,bc,dc (speed,history,precision)
    • 1+1, 1**1234
    • arbitrary precision: 11**1234; scentific notation
    • import math
      • introspection: dir(math); help(math)
      • i=1; math.sin(i)
    • from decimal import * (arbitrary precision floating point)
      • 11.0**1234
      • d=Decimal("11.0")
      • d**1234
      • getcontext().prec=2; d**1234
      • (d**1234).to_eng_string()