# HG changeset patch
# User Mike Hansen <mhansen@gmail.com>
# Date 1232362596 28800
# Node ID c9defd092eced2edf36979b11d4f738d0da46986
# Parent bc35da7a04ebbed6ad516372ab159b4e9f4f8cb1
Fix #4975
diff -r bc35da7a04eb -r c9defd092ece sage-preparse
|
a
|
b
|
|
| 102 | 102 | # Put the Sage library include along with a autogen message in the file. |
| 103 | 103 | # It is ** critical ** that we put this after the mdoule docstring, since |
| 104 | 104 | # otherwise the module docstring will disappear. |
| 105 | | insert = '%s%s%s.\nfrom sage.all_cmdline import * # import sage library\n'%(coding, AUTOGEN_MSG, f) |
| | 105 | insert = '%s%s.\nfrom sage.all_cmdline import * # import sage library\n'%(AUTOGEN_MSG, f) |
| 106 | 106 | i = find_position_right_after_module_docstring(G) |
| 107 | | G = G[:i] + insert + G[i:] |
| | 107 | G = coding + G[:i] + insert + G[i:] |
| 108 | 108 | |
| 109 | 109 | # Finally, write out the result. |
| 110 | 110 | open(fname, 'w').write(G) |