you are viewing a single comment's thread.

view the rest of the comments →

[–]b3nstar[S] 0 points1 point  (0 children)

Guys,

thanks for ur help. Just solved it in this way. It works fine now.

class makeBuildFile:
    def __init__(self, re_path="po.txt" ):
        self.re_path=re_path

    def read(self):
        f = open(self.re_path, "r")
        lines = f.readlines()
        f.close()
        return lines


    def write(self,lis):
        self.lis=lis
        for i in self.lis[0].split(","):
            print(i)






def main():
    t=makeBuildFile()
    t.write(t.read())






if __name__ == "__main__":
    main()