mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
Add groupname item to genList
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
2
test.py
2
test.py
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user