spacepaste

  1.  
  2. #!/usr/bin/env python
  3. import re
  4. import textwrap
  5. with open('Packages.stub', 'r+') as f:
  6. lines = f.readlines()
  7. for line in lines:
  8. line = line.lstrip()
  9. if line.startswith("Package: "):
  10. line = re.sub("^Package: ", "", line)
  11. line += ":"
  12. print(line, end="")
  13. else:
  14. print(textwrap.indent(line, ' ' * 2), end="")
  15.