def parse_drawing(filename,output_filename): name=locale_utils.utf_to_locale(filename) try: file = open(name, 'rb') except IOError, value: message = value.strerror raise SketchLoadError(_("Cannot open %(filename)s:\n%(message)s") % locals())
def parse_drawing(filename, output_filename): name = locale_utils.utf_to_locale(filename) try: file = open(name, 'rb') except IOError, value: message = value.strerror raise SketchLoadError( _("Cannot open %(filename)s:\n%(message)s") % locals())
def load_drawing(filename): if type(filename) == StringType: name = locale_utils.utf_to_locale(filename) #name=locale_utils.strip_line(name) try: file = open(name, 'rb') except IOError, value: message = value.strerror raise SketchLoadError( _("Cannot open %(filename)s:\n%(message)s") % locals())
def load_drawing(filename): if type(filename) == StringType: name=locale_utils.utf_to_locale(filename) #name=locale_utils.strip_line(name) try: file = open(name, 'rb') except IOError, value: message = value.strerror raise SketchLoadError(_("Cannot open %(filename)s:\n%(message)s") % locals())