예제 #1
0
파일: core_str.py 프로젝트: T00N3/T00N3Kit
def test_increment():
    print String.incrementName('plop')
    print String.incrementName('plop', ['plop'])
    print String.incrementName('plop12', ['plop', 'plop3', 'plop12'])

    names = list()

    for _ in range(10):
        name = String.incrementName('plop', names)
        names.append(name)
        print name
예제 #2
0
파일: string.py 프로젝트: T00N3/T00N3Kit
 def _resolveVariables(self, value):
     customs = {'WORK': 'C:/work'}
     return String.substituteVars(value, customs=customs)
예제 #3
0
파일: rex.py 프로젝트: T00N3/T00N3Kit
def main2():
    customs = {'nEsTed_var': 'NES %DEBUG_LEVEL% TED'}
    print String.substituteVars("plop ${deBuG_lEvEl}")
    print String.substituteVars("plop %NESTED_vAr% yo",
                                customs=customs)