Ejemplo n.º 1
0
def attendeeInfo():
    """
    Outputs attendee information
    """

    f = open("alist", "r")
    for line in f:
        name, email, company, state = line.split(',')
        a = Attendee(name, email, company, state)
        info = a.getInfo()
        print(info)
    f.close()
Ejemplo n.º 2
0
def getEmails():
    """
    Returns the email addresses of all the attendees
    """

    f = open("alist", "r")
    print("Emails:")
    for line in f:
        name, email, company, state = line.split(',')
        a = Attendee(name, email, company, state)
        em = a.getEmail()
        print(em)
    f.close()
Ejemplo n.º 3
0
def nameAndEmail():
    """
    Returns the name and email address of every attendee
    """

    f = open("alist", "r")
    print("Name:                 Email:")
    print("-----------------------------------")
    for line in f:
        name, email, company, state = line.split(',')
        a = Attendee(name, email, company, state)
        em = a.getEmail()
        na = a.getName()
        print("{0:20} {1:20}".format(na, em))
    f.close()
Ejemplo n.º 4
0
def get_attendees_from_csv(csv_path: str, process_all_by: int = 0) -> list:
    """
    Parameters
    ----------
    csv_path
        Path to CSV file, of which data of attendees are recorded
    process_all_by
        Number of attendees in a group of attendees for one order. 0 means all attendees in one order

    Returns
    -------
        List of list of attendees in one order
    """
    attendee_list = list()

    with open(csv_path) as f:
        attendee_lines = f.read().splitlines()

    # Remove header line=
    attendee_lines.pop(0)

    for line in attendee_lines:
        attendee = Attendee.from_csv_string(line)
        attendee_list.append(attendee)

    attendee_list_collections = list()
    if process_all_by != 0:
        attendee_list_collections = [
            attendee_list[i:i + process_all_by]
            for i in range(0, len(attendee_list), process_all_by)
        ]
    else:
        attendee_list_collections.append(attendee_list)

    return attendee_list_collections
Ejemplo n.º 5
0
def subscribe(course, attendeename):
    course.attendees.append(Attendee(attendeename))
Ejemplo n.º 6
0
#text based game
#where you are a worker at a ball park
#based on the one npr planet money episode about fenway hawkers

from attendee import Attendee  #import different classes of game
from items import Item
from weatherStuff import Weather

bug = "sup"


class Game:
    #main game class
    weather = Weather()


bert = Attendee(5, ["beer", "fries", "chowder"], "bleechers", 15)
bob = Attendee(10, ["coke, burger"], "home", 5)
print(bert.seat)
print(bob.seat)
Ejemplo n.º 7
0
 def _load_attendees(self):
     for a in self.event.attendees():
         att = Attendee(a.contact().email())
         att.copy_from(a)
         self._attendees.append(att)