Add groupname item to genList

This commit is contained in:
lukew3
2020-11-20 20:57:37 -05:00
parent ab8e1d57d2
commit ac352c0f0e
2 changed files with 5 additions and 3 deletions

View File

@@ -21,8 +21,10 @@ class Generator:
text) = traceback.extract_stack()[-2] text) = traceback.extract_stack()[-2]
funcname = filename[filename.rfind('/'):].strip() funcname = filename[filename.rfind('/'):].strip()
funcname = funcname[1:-3] funcname = funcname[1:-3]
# print(funcname) groupname = filename[:filename.rfind('/')].strip()
genList.append([id, title, self, funcname]) groupname = groupname[groupname.rfind('/'):].strip()
groupname = groupname[1:]
genList.append([id, title, self, funcname, groupname])
def __str__(self): def __str__(self):
return str( return str(

View File

@@ -10,7 +10,7 @@ for item in list:
print(item[2]) print(item[2])
# print(mathgen.getGenList()) # print(mathgen.getGenList())
print(mathgen.genById(1)) print(mathgen.genById(10))
#Make a pdf with 10 problems of generator id 1 #Make a pdf with 10 problems of generator id 1
# mathgen.makePdf(0, 10) # mathgen.makePdf(0, 10)