diff options
author | Benno Rice <benno@jeamland.net> | 2012-06-13 11:53:07 +1000 |
---|---|---|
committer | Benno Rice <benno@jeamland.net> | 2012-06-13 11:53:07 +1000 |
commit | a73aad95e666174a6fa5130378ff1a7f8ad63dc5 (patch) | |
tree | dd51ea65215959c941b2960244db2a1132c9c3b1 | |
parent | e7e62dce8319192bc7ccf91b0e4fae2fbc67e1f1 (diff) | |
download | pycco-a73aad95e666174a6fa5130378ff1a7f8ad63dc5.tar.gz |
Read in the code in the generate_documentation function.
-rw-r--r-- | pycco/main.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pycco/main.py b/pycco/main.py index 487ec5e..f7b942e 100644 --- a/pycco/main.py +++ b/pycco/main.py @@ -42,8 +42,8 @@ def generate_documentation(source, outdir=None, preserve_paths=True): if not outdir: raise TypeError("Missing the required 'outdir' keyword argument.") - fh = open(source, "r") - sections = parse(source, fh.read()) + code = open(source, "r").read() + sections = parse(source, code) highlight(source, sections, preserve_paths=preserve_paths, outdir=outdir) return generate_html(source, sections, preserve_paths=preserve_paths, outdir=outdir) |