Sharedwww / msri07 / a.pyOpen in CoCalc
Author: William A. Stein
1
######################################################################
2
# This file was *autogenerated* from the file a.sage.
3
######################################################################
4
class Speaker:
5
def __init__(self, name, employer=None, url=None, email=None, status=None, title=None, abstract=None):
6
self.name = name
7
self.employer = employer,
8
self.email = email
9
self.url = url
10
self.title = title
11
self.abstract = abstract
12
self.status = status
13
if status != 'invited' and status != 'contributed':
14
raise ValueError, '%s: "%s"'%(name, status)
15
16
def __repr__(self):
17
return self.name
18
19
def last_name(self):
20
name = self.name
21
if ' and ' in self.name:
22
name = self.name.split(' and ')[Integer(0)]
23
return ' '.join(name.split()[Integer(1):])
24
25
def first_name(self):
26
return self.name.split()[Integer(0)]
27
28
def __cmp__(self, right):
29
return cmp(self.last_name(), right.last_name())
30
31
def tag(self):
32
return self.name.replace(' ','')
33
34
def html_full(self):
35
return """
36
<a name="%s">
37
<b>%s</b>:
38
<i>%s</i><br>
39
%s"""%(
40
self.tag(), self.html_name(), self.html_title(), self.abstract)