Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlei committed Nov 19, 2016
1 parent 7532e2b commit a47b447
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions smop/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ def print_header(fp):
print >> fp, "# Autogenerated with SMOP " + version.__version__
# print >> fp, "from __future__ import division"
print >> fp, "from smop.core import *"
if options.link:
print >> fp, "from %s import *" % options.link
# if options.link:
# print >> fp, "from %s import *" % options.link
print >> fp, "#", options.filename


Expand All @@ -39,6 +39,8 @@ def main():
fp = open(options.output, "w")
else:
fp = None
if fp:
print_header(fp)
if options.glob_pattern:
options.filelist = fnmatch.filter(options.filelist,
options.glob_pattern)
Expand Down Expand Up @@ -72,6 +74,7 @@ def main():
if not options.output:
f = splitext(basename(options.filename))[0] + ".py"
with open(f, "w") as fp:
print_header(fp)
fp.write(s)
else:
fp.write(s)
Expand Down

0 comments on commit a47b447

Please sign in to comment.