hgbook

diff en/examples/run-example @ 45:6b7b0339e7d6

Don't rerun examples unnecessarily.
author Bryan O'Sullivan <bos@serpentine.com>
date Sun Jul 23 23:34:24 2006 -0700 (2006-07-23)
parents 5cee64874312
children a2f0b010d6e3
line diff
     1.1 --- a/en/examples/run-example	Mon Jul 17 00:00:12 2006 -0700
     1.2 +++ b/en/examples/run-example	Sun Jul 23 23:34:24 2006 -0700
     1.3 @@ -122,6 +122,7 @@
     1.4                      # then its output
     1.5                      ofp.write(tex_escape(output))
     1.6              self.status('\n')
     1.7 +            open(self.name + '.run', 'w')
     1.8          finally:
     1.9              try:
    1.10                  output = self.sendreceive('exit\n')
    1.11 @@ -143,6 +144,7 @@
    1.12      for name in os.listdir(path):
    1.13          if name == 'run-example' or name.startswith('.'): continue
    1.14          if name.endswith('.out') or name.endswith('~'): continue
    1.15 +        if name.endswith('.run'): continue
    1.16          pathname = os.path.join(path, name)
    1.17          st = os.lstat(pathname)
    1.18          if stat.S_ISREG(st.st_mode) and st.st_mode & 0111: