Ejemplo n.º 1
0
    def toTable(self, tafla = None, title = None, heading = None):
        listrep = self.getListRep()
        if tafla is None:
            tafla = table(tafla,title,heading)
        places = u.getLocations(listrep, lambda t: True if t != "" else False)
        (x,y) = places[0]
        print "F*g: %s" % (listrep[x][y].split()[0],)
        if not self.litur:
            self.litur = raw_input("HTML litur: ")

        for (i,j) in places:
            tafla.addToTable(listrep[i][j],self.litur,i,j)
            
        return tafla
Ejemplo n.º 2
0
 def getCourses(self):
     checkFunc = lambda t: True if t is not None else False
     locs = u.getLocations(self.table.tafla,lambda t: True if t is not None else False)
     timaDict = {}
     for (i,j) in locs:
         timar = self.table.tafla[i][j].timar
         for timi in timar:
             label = str(timi).split()[:2]
             if label[1][0] in string.uppercase:
                 label[1] = ""
             try:
                 f*g = timaDict[label[0]]
             except KeyError:
                 timaDict[label[0]] = {}
                 f*g = timaDict[label[0]]
             try:
                 f*g[label[1]].append((i,j))
             except KeyError:
                 f*g[label[1]] = [(i,j)]
                 
     return timaDict
Ejemplo n.º 3
0
    def getCourses(self):
        checkFunc = lambda t: True if t is not None else False
        locs = u.getLocations(self.table.tafla, lambda t: True
                              if t is not None else False)
        timaDict = {}
        for (i, j) in locs:
            timar = self.table.tafla[i][j].timar
            for timi in timar:
                label = str(timi).split()[:2]
                if label[1][0] in string.uppercase:
                    label[1] = ""
                try:
                    f*g = timaDict[label[0]]
                except KeyError:
                    timaDict[label[0]] = {}
                    f*g = timaDict[label[0]]
                try:
                    f*g[label[1]].append((i, j))
                except KeyError:
                    f*g[label[1]] = [(i, j)]

        return timaDict