# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : [email protected] # # Author : Guillaume Boulant (EDF) from argparse import ArgumentParser parser = ArgumentParser() parser.add_agument("-i", "--imagefile", dest="imagefile", help="image file to convert", metavar="FILE") parser.add_agument("-m", "--medfile", dest="medfile", default=None, help="output med file", metavar="FILE") args = parser.parse_args() import sys, os if args.imagefile is None: print("The image file must be specified") sys.exit() imagefile = args.imagefile