One suggestion is to construct the dictionary first:
CHOICES = dict(
NONE = 'No experience required',
SAIL = 'Sailing experience, new to racing',
RACE = 'General racing experience',
GOOD = 'Experienced racer',
ROCK = 'Rock star'
)
def experience_text(self):
try:
On 01/30/2012 07:02 AM, contro opinion wrote:
>>> s1='\x45'
>>> s2='\xe4'
>>> s1+s2
'E\xe4'
>>> print s1+s2
E
why s1+s2 not = '\x45\xe4'??
It is, but '\x45' is ASCII 'E', and '\xe4' is not a printable character:
>>> print '\x45'
E
>>> print '\xe4'
>>>
Try printing s1 and s2 separately i
I was looking for a simple way to daemonize a Python process, and found:
http://www.python.org/dev/peps/pep-3143/
I used easy_install to add this package (I thought), but when I
attempted to use the example in the above link, I got the error:
AttributeError: 'module' object has no attribute