In addition to Piotr's comment, I'd like to add this teaser. Simply copy the code to the Python app. It doesn't do fancy things, but shows how things could be displayed --- the Prime is a graphing calculator after all.
Code:
import hpprime as hp
from graphic import *
bg = 0xf8f8f8 #background color
hp.eval('print')
hp.fillrect(0,0,0,320,240,bg,cyan)
Width = 20
hMargin = 5; vMargin = 15
def string(arg):
return '"' + str(arg) +'"'
def RGB(r,g,b):
return (r*256+g)*256+b
def strip(arg):
return str(arg)[1:-1]
def TxtOut(t,x,y,f,c,*args):
if len(args)>2:
raise(SyntaxError("too many arguments"))
if True in [isinstance(i,list) for i in t]:
raise(TypeError("can't convert 'list' object to str implicitly"))
parms=(int(x),int(y),int(f),int(c))
if len(args)>0:parms+=(int(args[0]),)
if len(args)>1:parms+=(int(args[1]),)
return hp.eval('TEXTOUT_P('+string(t)+','+strip(parms)+')')
def TxtRight(t,x,y,f,c,*args):
x -= hp.eval('TEXTSIZE('+string(t)+','+str(f)+')')[0]
TxtOut(t,x,y,f,c,*args)
def TxtCenter(t,x,y,f,c,*args):
x -= (hp.eval('TEXTSIZE('+string(t)+','+str(f)+')')[0])/2
TxtOut(t,x,y,f,c,*args)
def PutSymb(Symb,x,y):
x = hMargin+(x-1)*Width+Width/2
y = vMargin+(y-1)*Width+Width/2
hp.circle(0,x,y,1,bg)
hp.pixon(0,x,y,bg)
TxtOut(Symb,x-Width/4,y-Width/4,2,0)
def DrawGrid():
hp.fillrect(0,hMargin-1,vMargin-1,Width*8+2,Width*8+2,0,bg)
xy0=[(hMargin+x*Width+Width/2,vMargin+y*Width+Width/2)
for x in range(8) for y in range(8)]
for xy in xy0:
x,y = xy
hp.circle(0,x,y,1,0)
hp.pixon(0,x,y,0)
TxtOut("Sector 8-8 in Qadrant 5-2",hMargin,0,2,0)
DrawGrid()
hp.eval('DRAWMENU("Course","Phaser","Torpedo","SR Scan","LR Scan","Report")')
PutSymb("E",8,8)
PutSymb("✵",5,5)
PutSymb("B",4,4)
PutSymb("K",2,6)
PutSymb("✵",1,1)
PutSymb("K",4,3)
TxtOut("Condition Yellow",200,10,3,0,200,yellow)
TxtOut("Energie: 290",200,30,3,0,200,red)
hp.eval("wait")
Hope you're addicted.