799 classstack[index][0].addGlobal( |
799 classstack[index][0].addGlobal( |
800 variable_name, attr) |
800 variable_name, attr) |
801 break |
801 break |
802 |
802 |
803 elif m.start("Import") >= 0: |
803 elif m.start("Import") >= 0: |
804 ## import module |
804 #- import module |
805 names = [n.strip() for n in |
805 names = [n.strip() for n in |
806 "".join(m.group("ImportList").splitlines()) |
806 "".join(m.group("ImportList").splitlines()) |
807 .replace("\\", "").split(',')] |
807 .replace("\\", "").split(',')] |
808 self.imports.extend( |
808 self.imports.extend( |
809 [name for name in names |
809 [name for name in names |
810 if name not in self.imports]) |
810 if name not in self.imports]) |
811 |
811 |
812 elif m.start("ImportFrom") >= 0: |
812 elif m.start("ImportFrom") >= 0: |
813 ## from module import stuff |
813 #- from module import stuff |
814 mod = m.group("ImportFromPath") |
814 mod = m.group("ImportFromPath") |
815 namesLines = (m.group("ImportFromList") |
815 namesLines = (m.group("ImportFromList") |
816 .replace("(", "").replace(")", "") |
816 .replace("(", "").replace(")", "") |
817 .replace("\\", "") |
817 .replace("\\", "") |
818 .strip().splitlines()) |
818 .strip().splitlines()) |