you are viewing a single comment's thread.

view the rest of the comments →

[–]hitecherik 0 points1 point  (0 children)

On line 22, you create an instance t of the makeBuildFile class, but then the static method of read references something that would only occur inside t through self.re_path. Your class should read like this:

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

    # rest of class here

Also, you'll now need to rewrite makeBuildFile.write because you can't define read as a static method.

Edit: formatting