''' Example use of FindImage by name. ''' import DigitalMicrograph as DM searchName = 'untitled' # Use any exact name here img = DM.FindImageByName( searchName ) if ( img is None ): print( 'No image "', searchName, '"was found' ) else: img.ShowImage() img.SetName( 'Found image!' ) del img # Always explicitly delete Py_Image variables