def getSessionTable(self, periods): table = "Start (ET) | UT | LST | (hr) | PI | Rx | Session\n" table += "------------------------------------------------------------------------------------\n" for p in periods: if p.session.project.pcode == "Maintenance": pi = "" else: pi = p.session.project.principal_investigator().last_name[:9] if p.session.project.principal_investigator() else "Unknown" table += "%s | %s | %s | %5s | %-9s | %-9s | %s\n" % ( self.utc2estDT(p.start) , p.start.strftime('%b %d %H:%M') , TimeAgent.dt2tlst(p.start).strftime('%H:%M') , "%2.2f" % p.duration , pi , p.session.receiver_list_simple()[:9] , p.session.name ) return table
def getSessionTable(self, periods): table = "Start (ET) | UT | LST | (hr) | T | S | PI | Rx | Session\n" table += "--------------------------------------------------------------------------------------\n" for p in periods: if p.session.project.pcode == "Maintenance": pi = "" else: pi = p.session.project.principal_investigator().last_name[:9] if p.session.project.principal_investigator() else "Unknown" table += "%s | %s | %s | %5s | %s | %s | %-9s | %-9s | %s\n" % ( TimeAgent.utc2est(p.start).strftime('%b %d %H:%M') # start (ET) , p.start.strftime('%b %d %H:%M') # start (UT) , TimeAgent.dt2tlst(p.start).strftime('%H:%M') # LST , "%2.2f" % p.duration # dur (Hrs) , p.session.session_type.type[0].upper() # sess type , p.state.abbreviation # state , pi , p.session.receiver_list_simple()[:9] , p.session.name ) return table