@@ -403,7 +403,7 @@ def custom_error(self, msg):
403403 return parser
404404
405405
406- def single_morph (parser , opts , pargs , stdout_flag = True , return_morph = False ):
406+ def single_morph (parser , opts , pargs , stdout_flag = True , python_wrap = False ):
407407 if len (pargs ) < 2 :
408408 parser .error ("You must supply FILE1 and FILE2." )
409409 elif len (pargs ) > 2 :
@@ -614,12 +614,14 @@ def single_morph(parser, opts, pargs, stdout_flag=True, return_morph=False):
614614 l_width = l_width ,
615615 )
616616
617- if return_morph :
617+ # Return different things depending on whether it is python interfaced
618+ if python_wrap :
618619 return morph_results , chain .x_morph_out , chain .y_morph_out
619- return morph_results
620+ else :
621+ return morph_results
620622
621623
622- def multiple_targets (parser , opts , pargs , stdout_flag = True ):
624+ def multiple_targets (parser , opts , pargs , stdout_flag = True , python_wrap = False ):
623625 # Custom error messages since usage is distinct when --multiple tag is
624626 # applied
625627 if len (pargs ) < 2 :
@@ -800,10 +802,14 @@ def multiple_targets(parser, opts, pargs, stdout_flag=True):
800802 "morph and target pair. No plot shown."
801803 )
802804
803- return morph_results
805+ if python_wrap :
806+ # FIXME: Return dictionary of morphs
807+ return morph_results
808+ else :
809+ return morph_results
804810
805811
806- def multiple_morphs (parser , opts , pargs , stdout_flag = True ):
812+ def multiple_morphs (parser , opts , pargs , stdout_flag = True , python_wrap = False ):
807813 # Custom error messages since usage is distinct when --multiple tag is
808814 # applied
809815 if len (pargs ) < 2 :
@@ -985,7 +991,11 @@ def multiple_morphs(parser, opts, pargs, stdout_flag=True):
985991 "morph and target pair. No plot shown."
986992 )
987993
988- return morph_results
994+ if python_wrap :
995+ # FIXME: Return dictionary of morphs
996+ return morph_results
997+ else :
998+ return morph_results
989999
9901000
9911001def getPDFFromFile (fn ):
0 commit comments