mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
Fix separator to be OS-consistent
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
@@ -8,7 +9,7 @@ import scipy
|
|||||||
|
|
||||||
genList = []
|
genList = []
|
||||||
|
|
||||||
|
SEP = os.sep
|
||||||
class Generator:
|
class Generator:
|
||||||
def __init__(self, title, id, func, kwargs):
|
def __init__(self, title, id, func, kwargs):
|
||||||
self.title = title
|
self.title = title
|
||||||
@@ -18,10 +19,10 @@ class Generator:
|
|||||||
|
|
||||||
(filename, line_number, function_name,
|
(filename, line_number, function_name,
|
||||||
text) = traceback.extract_stack()[-2]
|
text) = traceback.extract_stack()[-2]
|
||||||
funcname = filename[filename.rfind('/'):].strip()
|
funcname = filename[filename.rfind(SEP):].strip()
|
||||||
funcname = funcname[1:-3]
|
funcname = funcname[1:-3]
|
||||||
subjectname = filename[:filename.rfind('/')].strip()
|
subjectname = filename[:filename.rfind(SEP)].strip()
|
||||||
subjectname = subjectname[subjectname.rfind('/'):].strip()
|
subjectname = subjectname[subjectname.rfind(SEP):].strip()
|
||||||
subjectname = subjectname[1:]
|
subjectname = subjectname[1:]
|
||||||
genList.append([id, title, self, funcname, subjectname, kwargs])
|
genList.append([id, title, self, funcname, subjectname, kwargs])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user