Пример #1
0
"""filePath = raw_input("Enter the source FILE: ")
out = raw_input("Enter the destination FOLDER: ")"""
tab = 0

filePath = "C:\Users\Austin\Documents\Scrubs episode chooser.java"
out = "C:/Documents and Settings/Owner.YOUR-45F4F212AB/My Crap/python"

filePath = filePath.replace("\\","/")
out = out.replace("\\","/")

prog = open(filePath)
code = [line.replace('\n','') for line in prog.readlines()]
prog.close()
newProg = []

mainBlock,mainClassBlock = Global.generate("main",code)

quote = False
func = False
clas = False
switch = False
Loop = False
Do = False
mainCode = []
for lineNum,line in enumerate(code):
    if lineNum==mainClassBlock[0]:
        clas = True
        funcNames = Class.generate("function names",code[lineNum+2:],Global.newClass().findName(line))
    elif lineNum==mainClassBlock[1]:
        newProg += [line for line in mainCode]
        clas = False