This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# description: generate a series of arithmetic for teaching | |
# TODO | |
import os | |
import sys | |
import random | |
import string | |
def generater(rang): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
currentPath=os.getcwd() | |
tail='' | |
while currentPath != '/': | |
aa=os.path.split(currentPath) | |
tail=os.path.join(aa[1], tail) | |
if os.path.lexists(os.path.join(aa[0],'.s')): | |
os.chdir(os.path.join(aa[0], '.s', tail)) | |
break |