MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / Hello

Class Hello

plugins/python/test-twisted.py:28–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 tableTag = tag ('table', border='1')
27
28class Hello(Twisted.Page):
29 isLeaf = 1
30 document = tag('html')[
31 tag('head') [
32 tag('title')[ "Hi" ],
33 ],
34 tag('body') [
35 tag('h3')[ "Hello World!" ],
36 tag('p') [ place("dataTable") ]
37 ],
38 ]
39
40 def render_dataTable (self, context):
41 data = []
42
43 for id in BZFlag.Players.keys ():
44 player = BZFlag.Players[id]
45 data.append ([id, player.callsign, player.wins - player.losses, player.team])
46
47 return MyTable (data, [
48 Nouvelle.IndexedColumn ('id', 0),
49 Nouvelle.IndexedColumn ('callsign', 1),
50 Nouvelle.IndexedColumn ('score', 2),
51 Nouvelle.IndexedColumn ('team', 3),
52 ], id='players')
53
54reactor = BZReactor ()
55

Callers 1

test-twisted.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected