Difference between revisions of "Interesting Python"
Jump to navigation
Jump to search
PeterHarding (talk | contribs) |
PeterHarding (talk | contribs) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= Some Twisty Code = | = Some Twisty Code = | ||
< | <pre> | ||
field_values = ", ".join(['%s="%%(%s)s"' % (f, f) for f in self.field_names | field_values = ", ".join(['%s="%%(%s)s"' % (f, f) for f in self.field_names | ||
if f != self.primary_key_name]) | |||
</pre> | |||
< | <pre> | ||
return [self.syn_record_class(list(r) + | return [self.syn_record_class(list(r) + | ||
[s[1](self.record_class(r)) for s in self.syn_fields]) | [s[1](self.record_class(r)) for s in self.syn_fields]) | ||
for r in c.fetchall()] | for r in c.fetchall()] | ||
</ | </pre> | ||
=Some Manuals= | |||
* http://www.python.org/doc/2.5.1/modindex.html | |||
=A BASIC Interpreter= | |||
Found this lying around somewhere and thought it was worth preserving... | |||
It is by Andrea Griffini - agriff@tin.it - see Readme.txt, below... | |||
* http://www.performiq.com.au/kb/images/Basic.py | |||
* http://www.performiq.com.au/kb/images/Readme.txt | |||
* http://www.performiq.com.au/kb/images/Hanoi.bas | |||
* http://www.performiq.com.au/kb/images/Menu.bas | |||
* http://www.performiq.com.au/kb/images/Primes.bas | |||
* http://www.performiq.com.au/kb/images/Ttt.bas | |||
[[Category:Python]] |
Latest revision as of 10:46, 21 October 2008
Some Twisty Code
field_values = ", ".join(['%s="%%(%s)s"' % (f, f) for f in self.field_names if f != self.primary_key_name])
return [self.syn_record_class(list(r) + [s[1](self.record_class(r)) for s in self.syn_fields]) for r in c.fetchall()]
Some Manuals
A BASIC Interpreter
Found this lying around somewhere and thought it was worth preserving...
It is by Andrea Griffini - agriff@tin.it - see Readme.txt, below...