[prev in list] [next in list] [prev in thread] [next in thread]
List: bitpim-devel
Subject: [BitPim-devel] A patch for phone_features.py
From: "Jerad Clark" <jeradclark () gmail ! com>
Date: 2006-07-14 17:43:24
Message-ID: e8375c80607141043je7ecf9er3e72bccdf62cbaa2 () mail ! gmail ! com
[Download RAW message or body]
The html being generated was pretty bad, this patch cleans it up considerably.
Jerad
["patch-phone_features.txt" (text/plain)]
Index: C:/projects2/bitpim/help/phone_features.py
===================================================================
--- C:/projects2/bitpim/help/phone_features.py (revision 3482)
+++ C:/projects2/bitpim/help/phone_features.py (working copy)
@@ -67,10 +67,11 @@
return r
def html_results(r):
- print '<table cellpadding=5 cellspacing=5 border=1>'
- print '<tr><th>'
+ print '<table cellpadding="5" cellspacing="5" border="1">'
+ print '<tr>'
+ print '<th> </th>'
for n in features+misc_features:
- print '<th>%s'%n.replace('_', ' ').upper()
+ print '<th>%s</th>'%n.replace('_', ' ').upper()
print '</tr>'
keys=r.keys()
keys.sort()
@@ -79,14 +80,17 @@
x_flg={ True: 'X', False: '' }
for k in keys:
n=r[k]
- print '<tr><th>%s'%k
+ print '<tr align="center">'
+ print '<th>%s</th>'%k
for f in features+misc_features:
+ print '<td>',
if n[f].get('r', False) or n[f].get('w', False):
- print '<td align=center>%s %s'%(r_flg[n[f]['r']], w_flg[n[f]['w']])
+ print '%s %s'%(r_flg[n[f]['r']], w_flg[n[f]['w']]),
elif n[f].get('x', False):
- print '<td align=center>X'
+ print 'X',
else:
- print '<td align=center> '
+ print ' ',
+ print '</td>'
print '</tr>'
print '</table>'
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
BitPim-devel mailing list
BitPim-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic