Skip to content

Commit

Permalink
Exposing silent option.
Browse files Browse the repository at this point in the history
  • Loading branch information
olegsobolev committed Jan 8, 2024
1 parent 66949ba commit 432483d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cctbx/command_line/precession_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
.type = int
height = 800
.type = int
silent = True
.type = bool
format = *Auto png eps
.type = choice
""", process_includes=True)

def run(args, out=sys.stdout, silent=True):
def run(args, out=sys.stdout):
if (len(args) == 0):
params_out = StringIO()
master_phil.show(out=params_out, prefix=" ")
Expand Down Expand Up @@ -133,7 +135,7 @@ def run(args, out=sys.stdout, silent=True):
canvas = open(params.output_file, "w")
render.paint(canvas)
canvas.close()
elif (not silent):
elif (not params.silent):
render = render_pil(
w=params.width*8,
h=params.height*8,
Expand All @@ -144,7 +146,7 @@ def run(args, out=sys.stdout, silent=True):
render.render(canvas)
im2 = im.resize((params.width, params.height), Image.ANTIALIAS)
im2.save(params.output_file)
if (not silent):
if (not params.silent):
print("Wrote %s" % params.output_file, file=out)
else :
return scene, params
Expand Down

0 comments on commit 432483d

Please sign in to comment.