Codebase list sugar-pippy-activity / 97b5a99
Merge commit 'v37' into upstream Jonas Smedegaard 13 years ago
16 changed file(s) with 196 addition(s) and 241 deletion(s). Raw diff Collapse all Expand all
0 37
1 * Remove broken slideshow until it is fixed #2054 (James Cameron)
2 * Adapt pippy examples to screen dimensions (except xolyimpics),
3 dev.laptop.org #9260 (James Cameron)
4
05 36
16 * Add COPYING based on activity.info license field, verify source file
27 licenses, include LICENSE from Elements upstream SVN, fixes
33 service_name = org.laptop.Pippy
44 class = pippy_app.PippyActivity
55 icon = activity-icon
6 activity_version = 36
6 activity_version = 37
77 mime_types = text/x-python, pickle/groupthink-pippy
88 show_launcher = yes
99
11
22 import pippy, pygame, sys
33 from pygame.locals import *
4 from random import *
4
5 # the text to bounce around the screen
6 msg = "Hello!"
7
8 # the size of the text, in pixels
9 fsize = 36
10
11 # vector for motion, will control speed and angle
12 mvect = [3, 2]
513
614 # always need to init first thing
715 pygame.init()
917 # turn off cursor
1018 pygame.mouse.set_visible(False)
1119
12 # XO screen is 1200x900
13 size = width, height = 1200, 900
14
15 # we'll use 36 pixel high text
16 fsize = 36
17
18 # vector for motion, will control speed and angle
19 mvect = [3,2]
20
2120 # create the window and keep track of the surface
2221 # for drawing into
23 screen = pygame.display.set_mode(size)
22 screen = pygame.display.set_mode()
2423
25 msg = "Hello!"
24 # ask for screen's width and height
25 size = width, height = screen.get_size()
2626
2727 # create a Font object from a file, or use the default
2828 # font if the file name is None. size param is height
3434 # Font.render draws text onto a new surface.
3535 #
3636 # usage: Font.render(text, antialias, color, bg=None)
37 text = font.render(msg, True, (10,10,10))
37 text = font.render(msg, True, (10, 10, 10))
3838
3939 # the Rect object is used for positioning
4040 textRect = text.get_rect()
4545
4646 while pippy.pygame.next_frame():
4747
48 # every time we move the text, check for quit or keydown events and exit
4849 for event in pygame.event.get():
4950 if event.type == QUIT:
5051 sys.exit()
5253 elif event.type == KEYDOWN:
5354 sys.exit()
5455
55 screen.fill((250,250,250))
56
56 # fill the screen with almost white
57 screen.fill((250, 250, 250))
58
5759 # draw the text
5860 screen.blit(text, textRect)
5961
0 # image: take a picture
0 # camera: take a picture, animate it on screen
11
22 import gst, pippy, pygame, sys, time
3 from random import *
4
5 # XO screen is 1200 by 900
6 size = width, height = 1200, 900
73
84 # grey background
9 bgcolor = (128,128,128)
5 bgcolor = (128, 128, 128)
106
117 # grab a frame from camera to file
128 pipeline = gst.parse_launch('v4l2src ! ffmpegcolorspace ! jpegenc ! filesink location=/tmp/pippypic.jpg')
139 pipeline.set_state(gst.STATE_PLAYING)
1410
15 # pygame always needs to be initialized as the first call
11 # start using pygame
1612 pygame.init()
1713
1814 # turn off cursor
1915 pygame.mouse.set_visible(False)
2016
21 # create the pygame window at the desired size and return a Surface object for
17 # create the pygame window and return a Surface object for
2218 # drawing in that window.
23 screen = pygame.display.set_mode(size)
19 screen = pygame.display.set_mode()
2420
21 # pause for a second to allow the camera frame to be grabbed
2522 time.sleep(1)
23
24 # stop the camera frame grabbing
2625 pipeline.set_state(gst.STATE_NULL)
2726
28 # load in previously grabbed frame
27 # load in the grabbed camera frame
2928 image = pygame.image.load("/tmp/pippypic.jpg")
3029
3130 angle = 0.0
3231 scale = 2.0
3332
3433 while pippy.pygame.next_frame():
34 # every time we animate, check for quit or keydown events and exit
3535 for event in pygame.event.get():
3636 if event.type == pygame.QUIT: sys.exit()
3737 elif event.type == pygame.KEYDOWN: sys.exit()
3838
39 newImage = pygame.transform.rotozoom(image, angle,scale)
39 # rotate and scale the image
40 newImage = pygame.transform.rotozoom(image, angle, scale)
4041 newImageRect = newImage.get_rect()
4142 newImageRect.centerx = screen.get_rect().centerx
4243 newImageRect.centery = screen.get_rect().centery
4344
45 # display the rotated and scaled image
4446 screen.fill(bgcolor)
4547 screen.blit(newImage, newImageRect)
4648 pygame.display.flip()
4749
50 # choose a new rotation angle and scale
4851 angle = angle + 5.0
4952 scale = scale * 0.95
53
54 # finish once the scale becomes very very small
55 if scale < 0.001:
56 break
1111 print "_|_"
1212 print " "
1313 pippy.wait()
14
14
1515 pippy.console.clear()
1616 print "_o_"
1717 print " | "
1818 print "/ \\"
1919 pippy.wait()
20
20
2121 pippy.console.clear()
2222 print " o "
2323 print "/|\\"
2424 print "| |"
2525 pippy.wait()
26
26
2727 pippy.console.clear()
2828 print "_o_"
2929 print " | "
22 import pippy, pygame, sys
33 from pygame.locals import *
44 from random import *
5
6 # XO screen is 1200x900
7 size = width, height = 1200, 900
85
96 # always need to init first thing
107 pygame.init()
1411
1512 # create the window and keep track of the surface
1613 # for drawing into
17 screen = pygame.display.set_mode(size)
14 screen = pygame.display.set_mode()
15
16 # ask for screen's width and height
17 size = width, height = screen.get_size()
18
1819 # start the screen all black
1920 screen.fill((0,0,0))
2021
4748 pygame.display.flip()
4849
4950 # update the end points and the color
50 for i in range(2):
51 for i in range(2):
5152 start[i] = start[i] + mvect_start[i]
5253 end[i] = end[i] + mvect_end[i]
5354
55
66 # initialize pygame first thing
77 pygame.init()
8 screen = pygame.display.set_mode((1200,900))
9
8 screen = pygame.display.set_mode()
9
1010 # set up the physics world (instance of Elements)
1111 world = physics.Elements(screen.get_size())
1212 world.renderer.set_surface(screen)
13
13
1414 # set up initial physics objects
1515 world.add.ground()
1616 world.add.ball((600,0), 50)
1818
1919 # add 20 more balls
2020 balls = 0
21 while(balls<20):
22 world.add.ball((balls*5+200,balls*5), 50)
23 balls+=1
21 while(balls < 20):
22 world.add.ball((balls*5+200, balls*5), 50)
23 balls += 1
2424
2525 # begin physics simulation
2626 world.run_physics = True
4545 world.mouse_move(event.pos)
4646
4747 # clear display with a color
48 # (r,g,b), where 0<=value<256
49 screen.fill((80,160,240))
48 screen.fill((80, 160, 240))
5049
5150 # update & draw physics world
5251 world.update()
5453
5554 # update the display
5655 pygame.display.flip()
57
00 # pong: hit the ball with the paddle
11 #
22 # use the escape key to exit
3 #
3 #
44 # on the XO, the escape key is the top lefthand key,
55 # circle with an x in it.
66
1111 # always need to init first thing
1212 pygame.init()
1313
14 # XO screen is 1200x900
15 size = width, height = 1200, 900
16
1714 # create the window and keep track of the surface
1815 # for drawing into
19 screen = pygame.display.set_mode(size)
16 screen = pygame.display.set_mode()
17
18 # ask for screen's width and height
19 size = width, height = screen.get_size()
2020
2121 # turn off the cursor
2222 pygame.mouse.set_visible(False)
2323
2424 # turn on key repeating (repeat 40 times per second)
25 pygame.key.set_repeat(25,25)
25 pygame.key.set_repeat(25, 25)
2626
2727 # start the screen all black
28 bgcolor = (0,0,0)
28 bgcolor = (0, 0, 0)
2929 screen.fill(bgcolor)
3030
3131 # paddle constants
3232 paddle_width = 20
3333 paddle_length = 100
3434 paddle_radius = paddle_length / 2
35 paddle_color = (250,250,250)
35 paddle_color = (250, 250, 250)
3636 step = 6 # paddle moves 3 pixels at a go
3737
3838 # ball constants
39 ball_color = (250,250,250)
39 ball_color = (250, 250, 250)
4040 ball_radius = 25
4141
4242 # game constants
4343 fsize = 48
4444 msg = "Press 'g' to start game"
4545
46 font=pygame.font.Font(None, fsize)
47 text = font.render(msg, True, (250,250,250))
46 font = pygame.font.Font(None, fsize)
47 text = font.render(msg, True, (250, 250, 250))
4848 textRect = text.get_rect()
4949 textRect.centerx = screen.get_rect().centerx
5050 textRect.centery = screen.get_rect().centery
9999 or event.key == 259 \
100100 or event.key == 258: # down
101101 paddle_location = paddle_location + step
102
102
103103 # make sure the paddle is in-bounds
104104 if paddle_location - paddle_radius < 0:
105105 paddle_location = paddle_radius
112112 # draw the paddle on the right side of the screen
113113 pygame.draw.line(screen,
114114 paddle_color,
115 (width - paddle_width, paddle_location -
115 (width - paddle_width, paddle_location -
116116 paddle_radius),
117117 (width - paddle_width,
118118 paddle_location+paddle_radius),
123123
124124 # draw the unused balls
125125 for i in range(balls):
126 pygame.draw.circle(screen, ball_color, (int(round(30+i*ball_radius*2.4)), 30),
126 pygame.draw.circle(screen, ball_color,
127 (int(round(30+i*ball_radius*2.4)), 30),
127128 ball_radius)
128129
129130 # update the display
+0
-65
data/graphics/slideshow less more
0 # slideshow: show datastore photos
1 def pippy_activity_class(): return 'activity.PyGameActivity'
2 if __name__ == '__main__':
3 import gst, pippy, pygame, sys, time
4 from pippy import query
5
6 from random import *
7
8 # XO screen is 1200 by 900
9 size = width, height = 1200, 900
10
11 # grey background
12 bgcolor = (128,128,128)
13
14 # Create a search dict
15 search = {}
16 search["mime_type"] = "image/jpeg"
17
18 # Perform the search and retrieve the jobjects
19 results = query.find(search)
20 # XXX: Fix caching limit in query.py
21 objects = results.read(15)
22
23 if len(objects) == 0:
24 print "No photos found."
25 time.sleep(3)
26 sys.exit()
27
28 def get_image():
29 for jobject in objects:
30 yield jobject.get_file_path()
31
32 next_image = get_image()
33
34 # pygame always needs to be initialized as the first call
35 pygame.init()
36
37 # turn off cursor
38 pygame.mouse.set_visible(False)
39
40 # create the pygame window at the desired size and return a Surface object for
41 # drawing in that window.
42 screen = pygame.display.set_mode(size)
43
44 # load in previously grabbed frame
45 image = pygame.image.load(next_image.next())
46
47 while pippy.pygame.next_frame():
48 for event in pygame.event.get():
49 if event.type == pygame.QUIT: sys.exit()
50 elif event.type == pygame.KEYDOWN:
51 try:
52 image = pygame.image.load(next_image.next())
53 except StopIteration:
54 sys.exit()
55
56 # Scale up from 640x480 -> 1280x960
57 newImage = pygame.transform.rotozoom(image, 0, 2.0)
58 newImageRect = newImage.get_rect()
59 newImageRect.centerx = screen.get_rect().centerx
60 newImageRect.centery = screen.get_rect().centery
61
62 screen.fill(bgcolor)
63 screen.blit(newImage, newImageRect)
64 pygame.display.flip()
0 # snow
01
12 import pippy, pygame, sys
23 from pygame.locals import *
56 # always need to init first thing
67 pygame.init()
78
8 # XO screen is 1200x900
9 size = width, height = 1200, 900
10
119 # create the window and keep track of the surface
1210 # for drawing into
13 screen = pygame.display.set_mode(size)
11 screen = pygame.display.set_mode()
12
13 # ask for screen's width and height
14 width, height = screen.get_size()
1415
1516 # turn off the cursor
1617 pygame.mouse.set_visible(False)
1718
18 bg_color = (0,0,0)
19 bg_color = (0, 0, 0)
1920
2021 xs = []
2122 ys = []
0
1 import pippy, pygame, sys
2 from pygame.locals import *
3 from random import *
4 import math
5
6 # always need to init first thing
7 pygame.init()
8
9 # XO screen is 1200x900
10 size = width, height = 1200, 900
11
12 # create the window and keep track of the surface
13 # for drawing into
14 screen = pygame.display.set_mode(size)
15
16 # turn off the cursor
17 pygame.mouse.set_visible(False)
18
19 color = (250,250,250)
20 min_factor = 0.8
21 max_factor = 0.9
22 start_length = 130
23 min_length = 40
24 min_angle_delta = 0.4
25 max_angle_delta = 0.5
26
27 # start the screen all black
28 bgcolor = (0,0,0)
29 screen.fill(bgcolor)
30
31 def draw_tree(x, y, length, angle):
32 x2 = x + length * math.sin(angle)
33 y2 = y - length * math.cos(angle)
34 pygame.draw.line(screen, color, (x, y), (x2, y2))
35
36 if length > min_length:
37 # draw left branch
38 left_angle = angle - \
39 uniform(min_angle_delta, max_angle_delta)
40 left_length = length * \
41 uniform(min_factor, max_factor)
42 draw_tree(x2, y2, left_length, left_angle)
43 # draw middle branch
44 middle_length = length * \
45 uniform(min_factor, max_factor)
46 draw_tree(x2, y2, middle_length, angle)
47 # draw right branch
48 right_angle = angle + \
49 uniform(min_angle_delta, max_angle_delta)
50 right_length = length * \
51 uniform(min_factor, max_factor)
52 draw_tree(x2, y2, right_length, right_angle)
53
54 # clear the screen
55 screen.fill(bgcolor)
56
57 # draw a tree, starting at the bottom centre of the
58 # screen
59 draw_tree((width / 2), height - 20, start_length, 0)
60 pygame.display.flip()
61
62 while pippy.pygame.next_frame():
63 # chill until a key is pressed
64 for event in pygame.event.get():
65 if event.type == QUIT:
66 sys.exit()
67
68 if event.type == KEYDOWN:
69 if event.key == K_ESCAPE:
70 sys.exit()
0 # tree
1
2 import pippy, pygame, sys
3 from pygame.locals import *
4 from random import *
5 import math
6
7 # always need to init first thing
8 pygame.init()
9
10 # create the window and keep track of the surface
11 # for drawing into
12 screen = pygame.display.set_mode()
13
14 # ask for screen's width and height
15 width, height = screen.get_size()
16
17 # turn off the cursor
18 pygame.mouse.set_visible(False)
19
20 color = (250, 250, 250)
21 min_factor = 0.8
22 max_factor = 0.9
23 start_length = 130
24 min_length = 40
25 min_angle_delta = 0.4
26 max_angle_delta = 0.5
27
28 # start the screen all black
29 bgcolor = (0,0,0)
30 screen.fill(bgcolor)
31
32 def draw_tree(x, y, length, angle):
33 x2 = x + length * math.sin(angle)
34 y2 = y - length * math.cos(angle)
35 pygame.draw.line(screen, color, (x, y), (x2, y2))
36
37 if length > min_length:
38 # draw left branch
39 left_angle = angle - \
40 uniform(min_angle_delta, max_angle_delta)
41 left_length = length * \
42 uniform(min_factor, max_factor)
43 draw_tree(x2, y2, left_length, left_angle)
44 # draw middle branch
45 middle_length = length * \
46 uniform(min_factor, max_factor)
47 draw_tree(x2, y2, middle_length, angle)
48 # draw right branch
49 right_angle = angle + \
50 uniform(min_angle_delta, max_angle_delta)
51 right_length = length * \
52 uniform(min_factor, max_factor)
53 draw_tree(x2, y2, right_length, right_angle)
54
55 # clear the screen
56 screen.fill(bgcolor)
57
58 # draw a tree, starting at the bottom centre of the
59 # screen
60 draw_tree((width / 2), height - 20, start_length, 0)
61 pygame.display.flip()
62
63 # do nothing visible until the escape key is pressed
64 while pippy.pygame.next_frame():
65 for event in pygame.event.get():
66 if event.type == QUIT:
67 sys.exit()
68
69 if event.type == KEYDOWN:
70 if event.key == K_ESCAPE:
71 sys.exit()
1212 from pippy.physics import box2d
1313
1414 class XOlympicsGame:
15 def __init__(self,screen):
15 def __init__(self):
1616 self.rightscore = self.leftscore = 0
1717 self.forcespeed = 75
1818 self.jumpforce = 20
2626 self.rightJump = False
2727 self.updateList = []
2828
29 self.screen = pygame.display.set_mode((1200,900))
29 self.screen = pygame.display.set_mode()
30 self.width, self.height = self.screen.get_size()
3031
3132 self.clock = pygame.time.Clock()
32 self.font = pygame.font.Font(None, 24) # font object
3333
3434 # set up the world (instance of Elements)
3535 self.world = physics.Elements(self.screen.get_size())
3636 self.world.renderer.set_surface(self.screen)
3737 # set up static environment
38 self.world.set_color((0, 255, 0))
38 self.world.set_color((0, 255, 0))
3939 self.world.add.ground()
40 self.ball = self.world.add.ball((600, 0), 50)
40 self.ball = self.world.add.ball((self.width / 2, 0), 50)
4141 # add the left border and player (red)
42 self.world.set_color((255, 0, 0))
43 self.world.add.rect((0,-20), 25, 900, dynamic=False, density=1.0, restitution=0.16, friction=0.5)
44 self.leftplayer = self.world.add.poly(( 264.0, 81.0 ), ((-109.9405166666667, -64.244016666666653), (110.60718333333335, -63.089316666666605), (-0.66666666666668561, 127.33333333333337)) , dynamic=True, density=1.0, restitution=0.16, friction=0.5, screenCoord=False)
45 # add the right border and player (blue)
46 self.world.set_color((0, 0, 255))
47 self.world.add.rect((1180,-20), 25, 900, dynamic=False, density=1.0, restitution=0.16, friction=0.5)
48 self.rightplayer = self.world.add.poly(( 885.0, 78.0 ), [(108.94051666666667, -65.976066666666611), (2.6666666666666288, 127.33333333333337), (-111.60718333333341, -61.357266666666646)] , dynamic=True, density=1.0, restitution=0.16, friction=0.5, screenCoord=False)
49 # we're getting 2 grounds - grey and green. wtf.
50 self.leftplayer.linearDamping = 0.07
51 self.test = self.leftplayer.GetWorldCenter()
42 self.world.set_color((255, 0, 0))
43 self.world.add.rect((0, -20), 25, self.height,
44 dynamic=False, density=1.0,
45 restitution=0.16, friction=0.5)
46 self.leftplayer = self.world.add.poly(( self.width * 0.25, 81.0 ), [(-109.9405166666667, -64.244016666666653), (110.60718333333335, -63.089316666666605), (-0.66666666666668561, 127.33333333333337)] , dynamic=True, density=1.0, restitution=0.16, friction=0.5, screenCoord=False)
47 # add the right border and player (blue)
48 self.world.set_color((0, 0, 255))
49 self.world.add.rect((self.width, -20), 25, self.height,
50 dynamic=False, density=1.0,
51 restitution=0.16, friction=0.5)
52 self.rightplayer = self.world.add.poly(( self.width * 0.75, 81.0 ), [(108.94051666666667, -65.976066666666611), (2.6666666666666288, 127.33333333333337), (-111.60718333333341, -61.357266666666646)] , dynamic=True, density=1.0, restitution=0.16, friction=0.5, screenCoord=False)
53 # we're getting 2 grounds - grey and green. why?
54
5255 def run(self):
53 self.running = True
56 self.running = True
5457 while self.running:
5558
5659 for event in pygame.event.get():
8386 if (event.type == KEYDOWN and (event.key == K_UP or event.key == K_KP9)):
8487 self.rightJump = True
8588 if (event.type == KEYUP and (event.key == K_UP or event.key == K_KP9)):
86 self.rightJump = False
89 self.rightJump = False
8790 if (event.type == KEYDOWN and (event.key == K_DOWN or event.key == K_KP3)):
8891 self.rightDPress = True
8992 if (event.type == KEYUP and (event.key == K_DOWN or event.key == K_KP3)):
90 self.rightDPress = False
93 self.rightDPress = False
9194
9295 if self.leftLPress:
9396 self.leftplayer.ApplyForce(box2d.b2Vec2(-self.forcespeed,0), self.leftplayer.GetWorldCenter())
101104 if self.rightRPress:
102105 self.rightplayer.ApplyForce(box2d.b2Vec2(self.forcespeed,0), self.rightplayer.GetWorldCenter())
103106 if self.rightDPress:
104 self.rightplayer.ApplyImpulse(box2d.b2Vec2(0,-self.jumpforce), self.rightplayer.GetWorldCenter())
107 self.rightplayer.ApplyImpulse(box2d.b2Vec2(0,-self.jumpforce), self.rightplayer.GetWorldCenter())
105108 if self.rightJump:
106109 if self.rightplayer.GetWorldCenter().y < 0.75:
107 self.rightplayer.ApplyImpulse(box2d.b2Vec2(0,self.jumpforce), self.rightplayer.GetWorldCenter())
110 self.rightplayer.ApplyImpulse(box2d.b2Vec2(0,self.jumpforce), self.rightplayer.GetWorldCenter())
108111 if self.leftDPress:
109112 self.leftplayer.ApplyImpulse(box2d.b2Vec2(0,-self.jumpforce), self.leftplayer.GetWorldCenter())
110113
111 # Clear Display
114 # Clear Display
112115 if self.ball.GetWorldCenter().x < 1:
113116 self.leftscore += 1
114117 print "Goal Blue!", self.leftscore
115118 self.world.set_color((0, 0, 255))
116 self.ball = self.world.add.ball((600, 0), 50)
119 self.ball = self.world.add.ball((self.width/2, 0), 50)
117120 elif self.ball.GetWorldCenter().x > 11:
121 # FIXME: the 11 above works only when display width is
122 # 1200 pixels
118123 self.rightscore += 1
119124 print "Goal Red!", self.rightscore
120125 self.world.set_color((255, 0, 0))
121 self.ball = self.world.add.ball((600, 0), 50)
126 self.ball = self.world.add.ball((self.width/2, 0), 50)
122127
123 self.screen.fill((255,255,255))
128 self.screen.fill((255,255,255))
124129 # Update & Draw World
125130 self.world.update()
126131 self.world.draw()
127
132
128133 # Flip Display
129 pygame.display.flip()
130
134 pygame.display.flip()
135
131136 # Try to stay at 30 FPS
132 self.clock.tick(30) # originally 50
137 self.clock.tick(30) # originally 50
133138
134139 def main():
135 toolbarheight = 0
136 tabheight = 0
137140 pygame.init()
138141 pygame.display.init()
139 x,y = pygame.display.list_modes()[0]
140 screen = pygame.display.set_mode((x,y-toolbarheight))#-tabheight))
141142 # create an instance of the game
142 game = XOlympicsGame(screen)
143 game = XOlympicsGame()
143144 # start the main loop
144145 game.run()
145146
146 # make sure that main get's called
147 # make sure that main is called
147148 if __name__ == '__main__':
148149 main()
149
11
22 pippy.sound.playSine(pitch=1000, amplitude=5000)
33 pippy.sound.audioOut()
4
4
11
22 pippy.sound.playWave(sound='didjeridu', loop=True, duration=5)
33 pippy.sound.audioOut()
4
4
1616 'Directors & Advisors': 'Howard Anderson, Rebecca Allen, Ayo Kusamotu, Jose Maria Aznar, V. Michael Bove, Jr., Rodrigo Mesquita, Seymour Papert, Ted Selker, Ethan Beard (Google); John Roese (Nortel); Dandy Hsu (Quanta); Marcelo Claure (Brightstar); Gary Dillabough (eBay); Gustavo Arenas (AMD); Mike Evans (Red Hat); Ed Horowitz (SES Astra); Jeremy Philips (NewsCorp); Scott Soong (Chi Lin); Sehat Sutardja (Marvell); Joe Jacobson (MIT Media Lab); Steve Kaufman (Riverside); and Tom Meredith (MFI)',
1717 'Pippy': 'Chris Ball, C. Scott Ananian'
1818 }
19
19
2020 import random, time
2121 from pippy.console import *
2222 from textwrap import fill
2323
24 # Determine the number of columns in our window in
25 # order to wrap text to that width -- this changes
26 # when we run as a standalone activity instead of
24 # Determine the number of columns in our window in
25 # order to wrap text to that width -- this changes
26 # when we run as a standalone activity instead of
2727 # inside the output pane.
2828 cols, lines = size()
2929
3535 random.choice([red, green, yellow, blue, magenta, cyan])()
3636 #random.choice([normal, bold, underlined, inverse])()
3737 print '\n', fill("%s: %s" % (subsystem, table[subsystem]), int(cols))
38 table.pop(subsystem)
39 if len(table) == 0:
40 break
3841
3942 time.sleep(3)
43 reset()
500500
501501 def pippy_activity_version():
502502 """Returns the version number of the generated activity bundle."""
503 return 34
503 return 37
504504 def pippy_activity_extra_files():
505505 """Returns a map of 'extra' files which should be included in the
506506 generated activity bundle."""