HP Prime Python Libraries

The following list can be found on he calculator by starting the Python app and choosing the CMDS item in the bottom menu.

The Prime implements a subset of micropython whose full documentation is found at the Micropython site. Be aware that there are more routines documented there than exist in the Prime. For easier searching while writing code, the list below might be convenient. It is presented alphabetically, unlike on the Prime menus. Hopefully, HP will provide thorough documentation eventually.

arith
  asc
  char
  euler
  gcd
  iegcd
  ifactor
  isprime
  lcm
  nextprime
  nprimes
  prevprime

array
  array
    append
    extend

builtins
  abs
  all
  any
  bin
  bool
  bytearray
    append
    extend
  bytes
    center
    count
    decode
    endswith
    find
    format
    index
    isalpha
    isdigit
    islower
    isspace
    isupper
    join
    lower
    lstrip
    parition
    replace
    rfind
    rindex
    rpartition
    rsplit
    rstrip
    split
    splitlines
    startswith
    strip
    upper
  callable
  chr
  classmethod
  compile
  complex
  delattr
  dict
    clear
    copy
    fromkeys
    get
    items
    keys
    pop
    popitem
    setdefault
    update
    values
  dir
  divmod
  Ellipsis
  enumerate
  eval
  exec
  filter
  float
  frozenset
    copy
    difference
    intersection
    isdisjoint
    issubset
    issuperset
    symmetric_difference
    union
  getattr
  globals
  hasattr
  hash
  help
  hex
  id
  input
  int
    from_bytes
    to_bytes
  isinstance
  issubclass
  iter
  len
  list
    append
    clear
    copy
    count
    extend
    index
    insert
    pop
    remove
    reverse
    sort
  locals
  map
  max
  memoryview
  min
  next
  NotImplemented
  object
  oct
  open
  ord
  pow
  print
  property
    deleter
    getter
    setter
  range
  repr
  reversed
  round
  set
    add
    clear
    copy
    difference
    difference_update
    discard
    intersection
    intersection_update
    isdisjoint
    issubset
    issuperset
    pop
    remove
    symmetric_difference
    symmetric_difference_update
    union
    update
  setattr
  slice
  sorted
  str
    center
    count
    encode
    endswith
    find
    format
    index
    isalpha
    isdigit
    islower
    isspace
    isupper
    join
    lower
    lstrip
    partition
    replace
    rfind
    rindex
    rpartition
    rsplit
    rstrip
    split
    splitlines
    startswith
    strip
    upper
  staticmethod
  sum
  super
  tuple
    count
    index
  type
  zip
  ArithmeticError
  AssertionError
  AttributeError
  BaseException
  EOFError
  Exception
  GeneratorExit
  ImportError
  IndentationError
  IndexError
  KeyboardInterrupt
  KeyError
  LookupError
  MemoryError
  NameError
  NotImplementedError
  OSError
  OverflowError
  RuntimeError
  StopAsyncIteration
  StopIteration
  SyntaxError
  SystemError
  TypeError
  UnicodeError
  ValueError
  ZeroDivisionError

cas
  caseval
  eval_expr
  get_key
  xcas

cmath
  cos
  e
  exp
  log
  log10
  phase
  pi
  polar
  rect
  sin
  sqrt

gc
  collect
  disable
  enable
  isenabled
  mem_alloc
  mem_free
  threshold

graphic
  cyan
  magenta
  yellow
  black
  white
  red
  green
  blue
  clear_screen
  draw_arc
  draw_circle
  draw_filled_arc
  draw_filled_circle
  draw_filled_polygon
  draw_line
  draw_pixel
  draw_polygon
  draw_rectangle
  draw_string
  get_pixel
  set_pixel
  show
  show_screen

hpprime
  arc
  arc_c
  blit
  blit_c
  circle
  circle_c
  dimgrob
  dimgrob_c
  eval
  fillrect
  fillrect_c
  get_cartesian
  grob
  grob_c
  grobh
  grobh_c
  grobw
  grobw_c
  keyboard
  line
  line_c
  mouse
  pixon
  pixon_c
  rect
  rect_c
  set_cartesian
  strblit
  strblit_c
  textout
  textout_c

linalg
  abs
  add
  apply
  arange
  conj
  cross
  det
  dot
  egv
  eig
  eigenvects
  eye
  fft
  horner
  identity
  idn
  ifft
  im
  imag
  inv
  linspace
  matrix
  mul
  ones
  pcoeff
  peval
  pi
  proot
  rand
  ranm
  ranv
  re
  real
  rref
  shape
  size
  solve
  sub
  transpose
  zeros

math
  acos
  acosh
  asin
  asinh
  atan
  atan2
  atanh
  ceil
  copysign
  cos
  cosh
  degrees
  e
  erf
  erfc
  exp
  expm1
  fabs
  floor
  fmod
  frexp
  gamma
  isfinite
  isinf
  isnan
  ldexp
  lgamma
  log
  log10
  log2
  modf
  pi
  pow
  radians
  sin
  sinh
  sqrt
  tan
  tanh
  trunc

maplotl
  arrow
  axis
  bar
  barplot
  boxplot
  boxwhisker
  clf
  grid
  hist
  histogram
  linear_regression_plot
  plot
  scatter
  scatterplot
  show
  text
  vector

micropython
  const
  heap_lock
  heap_unlock
  kbd_intr
  mem_info
  opt_level
  pystack_use
  qstr_info
  stack_use

sys
  argv
  byteorder
  exc_info
  exit
  implementation
  maxsize
  modules
  path
  platform
  print_exception
  stderr
  stdin
  stdout
  version
  version_info

ucollections
  deque
    append
    popleft
  namedtuple
  OrderedDict
    clear
    copy
    fromkeys
    get
    items
    keys
    pop
    popitem
    setdefault
    update
    values

uerrno
  errorcode
  EACCES
  EADDRINUSE
  EAGAIN
  EALREADY
  EBADF
  ECONNABORTED
  ECONNREFUSED
  ECONNRESET
  EEXIST
  EHOSTUNREACH
  EINPROGRESS
  EINVAL
  EIO
  EISDIR
  ENOBUFS
  ENODEV
  ENOENT
  ENOMEM
  ENOTCONN
  EOPNOTSUPP
  EPERM
  ETIMEDOUT

uhashlib
  sha256
    digest
    update

uio
  open
  BytesIO
    close
    flush
    getvalue
    read
    readinto
    readline
    readlines
    seek
    write
  FileIO
    close
    fileno
    flush
    read
    readinto
    readline
    readlines
    seek
    tell
    write
  StringIO
    close
    flush
    getvalue
    read
    readinto
    readline
    readlines
    seek
    write
  TextIOWrapper
    close
    fileno
    flush
    read
    readinto
    readline
    readlines
    seek
    tell
    write

urandom
  choice
  getrandbits
  randint
  random
  randrange
  seed
  uniform

ure
  compile
  match
  search
  DEBUG

ustruct
  calcsize
  pack
  pack_into
  unpack
  unpack_from

utimeq
  utimeq
    peektime
    pop
    push