mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
fixed imports and removed my automation script
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
import random
|
||||
import math
|
||||
import fractions
|
||||
|
||||
from .additionFunc import *
|
||||
from .subtractionFunc import *
|
||||
from .multiplicationFunc import *
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
import os
|
||||
|
||||
file = ""
|
||||
with open("mathgen.py", 'r') as f:
|
||||
file = f.read()
|
||||
|
||||
file = file.split("\n\n")[8:]
|
||||
|
||||
i=0
|
||||
|
||||
imports_string = ""
|
||||
for listing in file:
|
||||
listing = listing[1:]
|
||||
if listing[:3] == "def":
|
||||
name = listing[4:listing.find("(")]
|
||||
imports_string+="import funcs."+name+"\n"
|
||||
with open("funcs/"+name+".py", 'w') as f:
|
||||
f.write("from funcs.imports import *\n\n\n"+listing+"\n")
|
||||
print("Saved!", i, "-", name)
|
||||
i+=1
|
||||
|
||||
with open("funcs/imports.py", 'w') as imports_file:
|
||||
imports_file.write(imports_string+"\n")
|
||||
|
||||
# print(file)
|
||||
Reference in New Issue
Block a user