[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/metacode pegboard.py
From: |
Vesa Kaihlavirta |
Subject: |
[Gzz-commits] gzz/metacode pegboard.py |
Date: |
Fri, 13 Dec 2002 06:27:41 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Vesa Kaihlavirta <address@hidden> 02/12/13 06:27:41
Modified files:
metacode : pegboard.py
Log message:
Replaced a=C(class='foo')-statements, as cpython doesn't fancy them.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/metacode/pegboard.py.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
Patches:
Index: gzz/metacode/pegboard.py
diff -u gzz/metacode/pegboard.py:1.22 gzz/metacode/pegboard.py:1.23
--- gzz/metacode/pegboard.py:1.22 Mon Nov 18 04:18:31 2002
+++ gzz/metacode/pegboard.py Fri Dec 13 06:27:41 2002
@@ -218,7 +218,10 @@
def pegboard_directive(*args):
pegtable.sort(pegcmp)
- table = nodes.table(class='pegboard')
+ # Python doesn't like this, as 'class' is reserved
+ # table = nodes.table(class='pegboard')
+ table = nodes.table()
+ table['class'] = 'pegboard'
tgroup = nodes.tgroup(cols=6)
table += tgroup
@@ -241,11 +244,12 @@
for peg in pegtable:
status = peg['status'].split()
+ row = nodes.row()
if status:
peg_class = 'peg-' + status[0].lower()
- row = nodes.row(class=peg_class)
- else:
- row = nodes.row()
+ # Python doesn't like this, as 'class' is reserved
+ # row = nodes.row(class=peg_class)
+ row['class'] = peg_class
tbody += row
@@ -270,11 +274,29 @@
status_emph
]
- row += td(status, class='peg_status_field')
- row += td(ref, class='peg_name_field')
- row += td(peg['topic'].split(':')[-1], class='peg_topic_field')
- row += td(string.join(_authors, ', '), class='peg_authors_field')
- row += td(string.join(_stakeholders, ', '),
class='peg_stakeholders_field')
+ # massive uglification here because cpython doesn't like
+ # the use of the reserved word 'class'. ;-/. Gotta think of
+ # something cuter.
+ #row += td(status, class='peg_status_field')
+ #row += td(ref, class='peg_name_field')
+ #row += td(peg['topic'].split(':')[-1], class='peg_topic_field')
+ #row += td(string.join(_authors, ', '), class='peg_authors_field')
+ #row += td(string.join(_stakeholders, ', '),
class='peg_stakeholders_field')
+ temp = td(status); temp['class'] = 'peg_status_field'
+ row += temp
+
+ temp = td(ref); temp['class'] = 'peg_name_field'
+ row += temp
+
+ temp = td(peg['topic'].split(':')[-1]); temp['class'] =
'peg_topic_field'
+ row += temp
+
+ temp = td(string.join(_authors, ', ')); temp['class'] =
'peg_authors_field'
+ row += temp
+
+ temp = td(string.join(_stakeholders, ', ')); temp['class'] =
'peg_stakeholders_field'
+ row += temp
+
row += make_files(peg)
return [table]
@@ -302,8 +324,15 @@
def make_files(peg):
- list = nodes.bullet_list(class="plain")
- entry = nodes.entry(class='peg_files_field')
+ # again, cpython and 'class'
+ # list = nodes.bullet_list(class="plain")
+ list = nodes.bullet_list()
+ list['class'] = 'plain'
+
+ # entry = nodes.entry(class='peg_files_field')
+ entry = nodes.entry()
+ entry['class'] = 'peg_files_field'
+
entry += list
for file in peg['files']:
@@ -323,11 +352,11 @@
if converted:
href = peg['dir'] + '/' + converted
+ ref = nodes.reference(anonymous=1, refuri=href)
if status:
klass = 'peg-'+status.split()[0].lower()
- ref = nodes.reference(anonymous=1, class=klass,
refuri=href)
- else:
- ref = nodes.reference(anonymous=1, refuri=href)
+ #ref = nodes.reference(anonymous=1, class=klass,
refuri=href)
+ ref['class'] = klass
text = nodes.Text(converted)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz/metacode pegboard.py,
Vesa Kaihlavirta <=