607 last_lineno_pos = start |
607 last_lineno_pos = start |
608 pubs = Publics(module, file, lineno, idents) |
608 pubs = Publics(module, file, lineno, idents) |
609 dictionary['__all__'] = pubs |
609 dictionary['__all__'] = pubs |
610 |
610 |
611 elif m.start("Import") >= 0: |
611 elif m.start("Import") >= 0: |
612 # import module |
612 ## import module |
613 names = [n.strip() for n in |
613 names = [n.strip() for n in |
614 "".join(m.group("ImportList").splitlines()) |
614 "".join(m.group("ImportList").splitlines()) |
615 .replace("\\", "").split(',')] |
615 .replace("\\", "").split(',')] |
616 lineno = lineno + src.count('\n', last_lineno_pos, start) |
616 lineno = lineno + src.count('\n', last_lineno_pos, start) |
617 last_lineno_pos = start |
617 last_lineno_pos = start |
619 dictionary["@@Import@@"] = Imports(module, file) |
619 dictionary["@@Import@@"] = Imports(module, file) |
620 for name in names: |
620 for name in names: |
621 dictionary["@@Import@@"].addImport(name, [], lineno) |
621 dictionary["@@Import@@"].addImport(name, [], lineno) |
622 |
622 |
623 elif m.start("ImportFrom") >= 0: |
623 elif m.start("ImportFrom") >= 0: |
624 # from module import stuff |
624 ## from module import stuff |
625 mod = m.group("ImportFromPath") |
625 mod = m.group("ImportFromPath") |
626 namesLines = (m.group("ImportFromList") |
626 namesLines = (m.group("ImportFromList") |
627 .replace("(", "").replace(")", "") |
627 .replace("(", "").replace(")", "") |
628 .replace("\\", "") |
628 .replace("\\", "") |
629 .strip().splitlines()) |
629 .strip().splitlines()) |