bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def cm_guess_font_info (filename): """this function fills in sensible values for fontinfo. | def cm_guess_font_info (filename): """this function fills in sensible values for fontinfo. | 36,400 |
def cm_guess_font_info (filename): """this function fills in sensible values for fontinfo. | def cm_guess_font_info (filename): """this function fills in sensible values for fontinfo. | 36,401 |
def cm_guess_font_info (filename): """this function fills in sensible values for fontinfo. | def cm_guess_font_info (filename): """this function fills in sensible values for fontinfo. | 36,402 |
def cm_guess_font_info (filename): """this function fills in sensible values for fontinfo. | def cm_guess_font_info (filename): """this function fills in sensible values for fontinfo. | 36,403 |
def guess_fontinfo (filename): fi = { 'FontName': filename, 'FamilyName': filename, 'Weight': 'regular', 'ItalicAngle': 0, 'FullName': filename, } if re.search ('^cm', filename): fi.update (cm_guess_font_info (filename)) return fi if read_afm_p: global afmfile if not afmfile: afmfile = find_file (filename + '.afm') ... | defguess_fontinfo(filename):fi={'FontName':filename,'FamilyName':filename,'Weight':'regular','ItalicAngle':0,'FullName':filename,}ifre.search('^cm',filename):fi.update(cm_guess_font_info(filename))returnfiifread_afm_p:globalafmfileifnotafmfile:afmfile=find_file(filename+'.afm')ifafmfile:afmfile=os.path.abspath(afmfile)... | 36,404 |
def guess_fontinfo (filename): fi = { 'FontName': filename, 'FamilyName': filename, 'Weight': 'regular', 'ItalicAngle': 0, 'FullName': filename, } if re.search ('^cm', filename): fi.update (cm_guess_font_info (filename)) return fi if read_afm_p: global afmfile if not afmfile: afmfile = find_file (filename + '.afm') ... | def guess_fontinfo (filename): fi = { 'FontName': filename, 'FamilyName': filename, 'Weight': 'Regular', 'ItalicAngle': 0, 'FullName': filename, } if re.search ('^cm', filename): fi.update (cm_guess_font_info (filename)) return fi if read_afm_p: global afmfile if not afmfile: afmfile = find_file (filename + '.afm') ... | 36,405 |
def guess_fontinfo (filename): fi = { 'FontName': filename, 'FamilyName': filename, 'Weight': 'regular', 'ItalicAngle': 0, 'FullName': filename, } if re.search ('^cm', filename): fi.update (cm_guess_font_info (filename)) return fi if read_afm_p: global afmfile if not afmfile: afmfile = find_file (filename + '.afm') ... | def guess_fontinfo (filename): fi = { 'FontName': filename, 'FamilyName': filename, 'Weight': 'regular', 'ItalicAngle': 0, 'FullName': filename, } if re.search ('^cm', filename): fi.update (cm_guess_font_info (filename, fi)) elif re.search ("^ec", filename): fi.update (ec_guess_font_info (filename, fi)) elif read_afm... | 36,406 |
def guess_fontinfo (filename): fi = { 'FontName': filename, 'FamilyName': filename, 'Weight': 'regular', 'ItalicAngle': 0, 'FullName': filename, } if re.search ('^cm', filename): fi.update (cm_guess_font_info (filename)) return fi if read_afm_p: global afmfile if not afmfile: afmfile = find_file (filename + '.afm') ... | def guess_fontinfo (filename): fi = { 'FontName': filename, 'FamilyName': filename, 'Weight': 'regular', 'ItalicAngle': 0, 'FullName': filename, } if re.search ('^cm', filename): fi.update (cm_guess_font_info (filename)) return fi if read_afm_p: global afmfile if not afmfile: afmfile = find_file (filename + '.afm') ... | 36,407 |
def abs_dir (x, dir): if os.path.abspath (x) != x: return os.path.join (dir, x) return x | def abs_dir (x, dir): if x and os.path.abspath (x) != x: return os.path.join (dir, x) return x | 36,408 |
def make_pbm (filename, outname, char_number): """ Extract bitmap from the PK file using `gf2pbm' Return FALSE if the glyph is not valid. """ status = system ("gf2pbm -n %d -o %s %s" %(char_number, outname, filename), ignore_error = 1) return (status == 0) | def make_pbm (filename, outname, char_number): """ Extract bitmap from the PK file FILENAME (absolute) using `gf2pbm'. Return FALSE if the glyph is not valid. """ status = system ("gf2pbm -n %d -o %s %s" %(char_number, outname, filename), ignore_error = 1) return (status == 0) | 36,409 |
def make_pbm (filename, outname, char_number): """ Extract bitmap from the PK file using `gf2pbm' Return FALSE if the glyph is not valid. """ status = system ("gf2pbm -n %d -o %s %s" %(char_number, outname, filename), ignore_error = 1) return (status == 0) | def make_pbm (filename, outname, char_number): """ Extract bitmap from the PK file using `gf2pbm' Return FALSE if the glyph is not valid. """ command = "gf2pbm -n %d -o %s %s" %(char_number, outname, filename) status = system (command, ignore_error = 1) return (status == 0) | 36,410 |
def autotrace_font (fontname, metric, glyphs, encoding, magnification): global gf_fontname if not gf_fontname: base = gen_pixel_font (fontname, metric, magnification) gf_fontname = base + 'gf' t1os = [] font_bbox = (10000,10000,-10000,-10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph ... | def autotrace_font (fontname, gf_file, metric, glyphs, encoding, magnification): t1os = [] font_bbox = (10000,10000,-10000,-10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph testing. # glyphs = [] for a in glyphs: valid = metric.has_char (a) if not valid: continue valid = make_pbm (gf_f... | 36,411 |
def autotrace_font (fontname, metric, glyphs, encoding, magnification): global gf_fontname if not gf_fontname: base = gen_pixel_font (fontname, metric, magnification) gf_fontname = base + 'gf' t1os = [] font_bbox = (10000,10000,-10000,-10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph ... | def autotrace_font (fontname, metric, glyphs, encoding, magnification): global gf_fontname if not gf_fontname: base = gen_pixel_font (fontname, metric, magnification) gf_fontname = base + 'gf' t1os = [] font_bbox = (10000,10000,-10000,-10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph ... | 36,412 |
def autotrace_font (fontname, metric, glyphs, encoding, magnification): global gf_fontname if not gf_fontname: base = gen_pixel_font (fontname, metric, magnification) gf_fontname = base + 'gf' t1os = [] font_bbox = (10000,10000,-10000,-10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph ... | def autotrace_font (fontname, metric, glyphs, encoding, magnification): global gf_fontname if not gf_fontname: base = gen_pixel_font (fontname, metric, magnification) gf_fontname = base + 'gf' t1os = [] font_bbox = (10000,10000,-10000,-10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph ... | 36,413 |
def autotrace_font (fontname, metric, glyphs, encoding, magnification): global gf_fontname if not gf_fontname: base = gen_pixel_font (fontname, metric, magnification) gf_fontname = base + 'gf' t1os = [] font_bbox = (10000,10000,-10000,-10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph ... | def autotrace_font (fontname, metric, glyphs, encoding, magnification): global gf_fontname if not gf_fontname: base = gen_pixel_font (fontname, metric, magnification) gf_fontname = base + 'gf' t1os = [] font_bbox = (10000,10000,-10000,-10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph ... | 36,414 |
def autotrace_font (fontname, metric, glyphs, encoding, magnification): global gf_fontname if not gf_fontname: base = gen_pixel_font (fontname, metric, magnification) gf_fontname = base + 'gf' t1os = [] font_bbox = (10000,10000,-10000,-10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph ... | def autotrace_font (fontname, metric, glyphs, encoding, magnification): global gf_fontname if not gf_fontname: base = gen_pixel_font (fontname, metric, magnification) gf_fontname = base + 'gf' t1os = [] font_bbox = (10000,10000,-10000,-10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph ... | 36,415 |
def autotrace_font (fontname, metric, glyphs, encoding, magnification): global gf_fontname if not gf_fontname: base = gen_pixel_font (fontname, metric, magnification) gf_fontname = base + 'gf' t1os = [] font_bbox = (10000,10000,-10000,-10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph ... | def autotrace_font (fontname, metric, glyphs, encoding, magnification): global gf_fontname if not gf_fontname: base = gen_pixel_font (fontname, metric, magnification) gf_fontname = base + 'gf' t1os = [] font_bbox = (10000,10000,-10000,-10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph ... | 36,416 |
def autotrace_font (fontname, metric, glyphs, encoding, magnification): global gf_fontname if not gf_fontname: base = gen_pixel_font (fontname, metric, magnification) gf_fontname = base + 'gf' t1os = [] font_bbox = (10000,10000,-10000,-10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph ... | def autotrace_font (fontname, metric, glyphs, encoding, magnification): global gf_fontname if not gf_fontname: base = gen_pixel_font (fontname, metric, magnification) gf_fontname = base + 'gf' t1os = [] font_bbox = (10000,10000,-10000,-10000) progress (_ ("Tracing bitmaps... ")) eps_lines = [] # for single glyph ... | 36,417 |
def __getitem__ (self, key): return self.__dict__[key] | def __getitem__ (self, key): return self.__dict__[key] | 36,418 |
def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | 36,419 |
def make_pbm (filename, outname, char_number): """ Extract bitmap from the PK file FILENAME (absolute) using `gf2pbm'. Return FALSE if the glyph is not valid. """ command = "gf2pbm -n %d -o %s %s" %(char_number, outname, filename) status = system (command, ignore_error = 1) return (status == 0) | def make_pbm (filename, outname, char_number): """ Extract bitmap from the PK file FILENAME (absolute) using `gf2pbm'. Return FALSE if the glyph is not valid. """ command = "gf2pbm -n %d -o %s %s" %(char_number, outname, filename) status = system (command, ignore_error = 1) return (status == 0) | 36,420 |
def read_encoding (file): sys.stderr.write(_("Using encoding file: `%s'\n") % file) str = open (file).read () str = re.sub ("%.*", '', str) str = re.sub ("[\n\t \f]+", ' ', str) m = re.search ('/([^ ]+) \[([^\]]+)\] def', str) if not m: raise 'Encoding file invalid.' name = m.group(1) cod =m.group( 2) cod = re.sub('[... | def read_encoding (file): sys.stderr.write(_("Using encoding file: `%s'\n") % file) str = open (file).read () str = re.sub ("%.*", '', str) str = re.sub ("[\n\t \f]+", ' ', str) m = re.search ('/([^ ]+) \[([^\]]+)\] def', str) if not m: raise 'Encoding file invalid.' name = m.group (1) cod = m.group (2) cod = re.sub ... | 36,421 |
def check_pfaedit_scripting (): stat = system ("fontforge -usage > pfv 2>&1", ignore_error = 1) fontforge_cmd = 'fontforge' if stat <> 0: stat = system ("pfaedit -usage > pfv 2>&1", ignore_error = 1) if stat == 0: fontforge_cmd = 'pfaedit' if stat <> 0: warning ("Command `fontforge -usage' failed. Cannot simplify or c... | def check_pfaedit_scripting (): global fontforge_cmd stat = system ("fontforge -usage > pfv 2>&1 > /dev/null", ignore_error = 1) if stat <> 0: stat = system ("pfaedit -usage > pfv 2>&1", ignore_error = 1) if stat == 0: fontforge_cmd = 'pfaedit' if stat <> 0: warning ("Command `fontforge -usage' failed. Cannot simplify... | 36,422 |
def make_pbm (filename, outname, char_number): """ Extract bitmap from the PK file FILENAME (absolute) using `gf2pbm'. Return FALSE if the glyph is not valid. """ command = "%s/gf2pbm -n %d -o %s %s" % (bindir, char_number, outname, filename) status = system (command, ignore_error = 1) return (status == 0) | defmake_pbm(filename,outname,char_number):"""ExtractbitmapfromthePKfileFILENAME(absolute)using`gf2pbm'.ReturnFALSEiftheglyphisnotvalid."""command="%s/gf2pbm-n%d-o%s%s"%(bindir,char_number,outname,filename)status=system(command,ignore_error=1)return(status==0) | 36,423 |
def cm_guess_font_info (filename, fontinfo): # urg. filename = re.sub ("cm(.*)tt", r"cmtt\1", filename) m = re.search ("([0-9]+)$", filename) design_size = '' if m: design_size = string.atoi (m.group (1)) fontinfo['DesignSize'] = design_size prefixes = [("cmtt", "CMTypewriter"), ("cmvtt", "CMVariableWidthTypewriter"),... | def cm_guess_font_info (filename, fontinfo): # urg. filename = re.sub ("cm(.*)tt", r"cmtt\1", filename) m = re.search ("([0-9]+)$", filename) design_size = '' if m: design_size = string.atoi (m.group (1)) fontinfo['DesignSize'] = design_size prefixes = [("cmtt", "CModernTypewriter"), ("cmvtt", "CModernVariableWidthTyp... | 36,424 |
def ec_guess_font_info (filename, fontinfo): design_size = 12 m = re.search ("([0-9]+)$", filename) if m: design_size = string.atoi (m.group (1)) fontinfo['DesignSize'] = design_size prefixes = [("ecss", "EuropeanCMSans"), ("ectt", "EuropeanCMTypewriter"), ("ec", "EuropeanCM")] family = '' for (k, v) in prefixes: if ... | def ec_guess_font_info (filename, fontinfo): design_size = 12 m = re.search ("([0-9]+)$", filename) if m: design_size = string.atoi (m.group (1)) fontinfo['DesignSize'] = design_size prefixes = [("ecss", "ECModernSans"), ("ectt", "ECModernTypewriter"), ("ec", "ECModern")] family = '' for (k, v) in prefixes: if re.sea... | 36,425 |
def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | 36,426 |
def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | 36,427 |
def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | 36,428 |
def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | 36,429 |
def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | 36,430 |
def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | 36,431 |
def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | 36,432 |
def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str | 36,433 |
def warranty (): identify (sys.stdout) sys.stdout.write ('\n') sys.stdout.write (_ ('Copyright (c) %s by' % ' 2001--2002')) sys.stdout.write ('\n') sys.stdout.write (' Han-Wen Nienhuys') sys.stdout.write (' Jan Nieuwenhuizen') sys.stdout.write ('\n') sys.stdout.write (_ (r''' | def warranty (): identify (sys.stdout) sys.stdout.write ('\n') sys.stdout.write (_ ('Copyright (c) %s by' % ' 2001--2004')) sys.stdout.write ('\n') sys.stdout.write (' Han-Wen Nienhuys') sys.stdout.write (' Jan Nieuwenhuizen') sys.stdout.write ('\n') sys.stdout.write (_ (r''' | 36,434 |
def warranty (): identify (sys.stdout) sys.stdout.write ('\n') sys.stdout.write (_ ('Copyright (c) %s by' % ' 2001--2002')) sys.stdout.write ('\n') sys.stdout.write (' Han-Wen Nienhuys') sys.stdout.write (' Jan Nieuwenhuizen') sys.stdout.write ('\n') sys.stdout.write (_ (r''' | def warranty (): identify (sys.stdout) sys.stdout.write ('\n') sys.stdout.write (_ ('Copyright (c) %s by' % ' 2001--2002')) sys.stdout.write ('\n') sys.stdout.write (' Han-Wen Nienhuys') sys.stdout.write (' Jan Nieuwenhuizen') sys.stdout.write ('\n') sys.stdout.write (_ (r''' | 36,435 |
def warning (s): errorport.write (_ ("warning: ") + s) | def warning (s): errorport.write (_ ("warning: ") + s) | 36,436 |
def error (s): '''Report the error S. Exit by raising an exception. Please do not abuse by trying to catch this error. If you do not want a stack trace, write to the output directly. RETURN VALUE None ''' errorport.write (_ ("error: ") + s + '\n') raise _ ("Exiting ... ") | def error (s): '''Report the error S. Exit by raising an exception. Please do not abuse by trying to catch this error. If you do not want a stack trace, write to the output directly. RETURN VALUE None ''' errorport.write (_ ("error: ") + s + '\n') raise _ ("Exiting ... ") | 36,437 |
def error (s): '''Report the error S. Exit by raising an exception. Please do not abuse by trying to catch this error. If you do not want a stack trace, write to the output directly. RETURN VALUE None ''' errorport.write (_ ("error: ") + s + '\n') raise _ ("Exiting ... ") | def error (s): '''Report the error S. Exit by raising an exception. Please do not abuse by trying to catch this error. If you do not want a stack trace, write to the output directly. RETURN VALUE None ''' errorport.write (_ ("error: ") + s + '\n') raise _ ("Exiting ... ") | 36,438 |
def error (s): '''Report the error S. Exit by raising an exception. Please do not abuse by trying to catch this error. If you do not want a stack trace, write to the output directly. RETURN VALUE None ''' errorport.write (_ ("error: ") + s + '\n') raise _ ("Exiting ... ") | def error (s): '''Report the error S. Exit by raising an exception. Please do not abuse by trying to catch this error. If you do not want a stack trace, write to the output directly. RETURN VALUE None ''' errorport.write (_ ("error: ") + s + '\n') raise _ ("Exiting ... ") | 36,439 |
def getopt_args (opts): '''Construct arguments (LONG, SHORT) for getopt from list of options.''' short = '' long = [] for o in opts: if o[1]: short = short + o[1] if o[0]: short = short + ':' if o[2]: l = o[2] if o[0]: l = l + '=' long.append (l) return (short, long) | def getopt_args (opts): '''Construct arguments (LONG, SHORT) for getopt from list of options.''' short = '' long = [] for o in opts: if o[1]: short = short + o[1] if o[0]: short = short + ':' if o[2]: l = o[2] if o[0]: l = l + '=' long.append (l) return (short, long) | 36,440 |
def getopt_args (opts): '''Construct arguments (LONG, SHORT) for getopt from list of options.''' short = '' long = [] for o in opts: if o[1]: short = short + o[1] if o[0]: short = short + ':' if o[2]: l = o[2] if o[0]: l = l + '=' long.append (l) return (short, long) | def getopt_args (opts): '''Construct arguments (LONG, SHORT) for getopt from list of options.''' short = '' long = [] for o in opts: if o[1]: short = short + o[1] if o[0]: short = short + ':' if o[2]: lst = o[2] if o[0]: l = l + '=' long.append (l) return (short, long) | 36,441 |
def getopt_args (opts): '''Construct arguments (LONG, SHORT) for getopt from list of options.''' short = '' long = [] for o in opts: if o[1]: short = short + o[1] if o[0]: short = short + ':' if o[2]: l = o[2] if o[0]: l = l + '=' long.append (l) return (short, long) | def getopt_args (opts): '''Construct arguments (LONG, SHORT) for getopt from list of options.''' short = '' long = [] for o in opts: if o[1]: short = short + o[1] if o[0]: short = short + ':' if o[2]: l = o[2] if o[0]: lst = lst + '=' long.append (lst) return (short, long) | 36,442 |
def option_help_str (o): '''Transform one option description (4-tuple ) into neatly formatted string''' sh = ' ' if o[1]: sh = '-%s' % o[1] sep = ' ' if o[1] and o[2]: sep = ',' long = '' if o[2]: long= '--%s' % o[2] arg = '' if o[0]: if o[2]: arg = '=' arg = arg + o[0] return ' ' + sh + sep + long + arg | def option_help_str (o): '''Transform one option description (4-tuple) into neatly formatted string''' sh = ' ' if o[1]: sh = '-%s' % o[1] sep = ' ' if o[1] and o[2]: sep = ',' long = '' if o[2]: long= '--%s' % o[2] arg = '' if o[0]: if o[2]: arg = '=' arg = arg + o[0] return ' ' + sh + sep + long + arg | 36,443 |
def option_help_str (o): '''Transform one option description (4-tuple ) into neatly formatted string''' sh = ' ' if o[1]: sh = '-%s' % o[1] sep = ' ' if o[1] and o[2]: sep = ',' long = '' if o[2]: long= '--%s' % o[2] arg = '' if o[0]: if o[2]: arg = '=' arg = arg + o[0] return ' ' + sh + sep + long + arg | def option_help_str (o): '''Transform one option description (4-tuple ) into neatly formatted string''' sh = ' ' if o[1]: sh = '-%s' % o[1] sep = ' ' if o[1] and o[2]: sep = ',' long = '' if o[2]: long= '--%s' % o[2] arg = '' if o[0]: if o[2]: arg = '=' arg = arg + o[0] return ' ' + sh + sep + long + arg | 36,444 |
def option_help_str (o): '''Transform one option description (4-tuple ) into neatly formatted string''' sh = ' ' if o[1]: sh = '-%s' % o[1] sep = ' ' if o[1] and o[2]: sep = ',' long = '' if o[2]: long= '--%s' % o[2] arg = '' if o[0]: if o[2]: arg = '=' arg = arg + o[0] return ' ' + sh + sep + long + arg | def option_help_str (o): '''Transform one option description (4-tuple ) into neatly formatted string''' sh = ' ' if o[1]: sh = '-%s' % o[1] sep = ' ' if o[1] and o[2]: sep = ',' long = '' if o[2]: long = '--%s' % o[2] arg = '' if o[0]: if o[2]: arg = '=' arg = arg + o[0] return ' ' + sh + sep + long + arg | 36,445 |
def option_help_str (o): '''Transform one option description (4-tuple ) into neatly formatted string''' sh = ' ' if o[1]: sh = '-%s' % o[1] sep = ' ' if o[1] and o[2]: sep = ',' long = '' if o[2]: long= '--%s' % o[2] arg = '' if o[0]: if o[2]: arg = '=' arg = arg + o[0] return ' ' + sh + sep + long + arg | defoption_help_str(o):'''Transformoneoptiondescription(4-tuple)intoneatlyformattedstring'''sh=''ifo[1]:sh='-%s'%o[1]sep=''ifo[1]ando[2]:sep=','long=''ifo[2]:long='--%s'%o[2]arg=''ifo[0]:ifo[2]:arg='='arg=arg+o[0]return''+sh+sep+long+arg | 36,446 |
def options_help_str (opts): '''Convert a list of options into a neatly formatted string''' w = 0 strs =[] helps = [] for o in opts: s = option_help_str (o) strs.append ((s, o[3])) if len (s) > w: w = len (s) str = '' for s in strs: str = str + '%s%s%s\n' % (s[0], ' ' * (w - len(s[0]) + 3), s[1]) return str | def options_help_str (opts): '''Convert a list of options into a neatly formatted string''' w = 0 strs = [] helps = [] for o in opts: s = option_help_str (o) strs.append ((s, o[3])) if len (s) > w: w = len (s) str = '' for s in strs: str = str + '%s%s%s\n' % (s[0], ' ' * (w - len(s[0]) + 3), s[1]) return str | 36,447 |
def options_help_str (opts): '''Convert a list of options into a neatly formatted string''' w = 0 strs =[] helps = [] for o in opts: s = option_help_str (o) strs.append ((s, o[3])) if len (s) > w: w = len (s) str = '' for s in strs: str = str + '%s%s%s\n' % (s[0], ' ' * (w - len(s[0]) + 3), s[1]) return str | def options_help_str (opts): '''Convert a list of options into a neatly formatted string''' w = 0 strs =[] helps = [] for o in opts: s = option_help_str (o) strs.append ((s, o[3])) if len (s) > w: w = len (s) str = '' for s in strs: str = str + '%s%s%s\n' % (s[0], ' ' * (w - len (s[0]) + 3), s[1]) return str | 36,448 |
def help (): ls = [(_ ("Usage: %s [OPTION]... FILE...") % program_name), ('\n\n'), (help_summary), ('\n\n'), (_ ("Options:")), ('\n'), (options_help_str (option_definitions)), ('\n\n'), (_ ("Report bugs to %s") % 'hanwen@cs.uu.nl'), ('\n')] map (sys.stdout.write, ls) | def help (): ls = [(_ ("Usage: %s [OPTION]... FILE...") % program_name), ('\n\n'), (help_summary), ('\n\n'), (_ ("Options:")), ('\n'), (options_help_str (option_definitions)), ('\n\n'), (_ ("Report bugs to %s") % 'hanwen@cs.uu.nl'), ('\n')] map (sys.stdout.write, ls) | 36,449 |
def setup_temp (): """ Create a temporary directory, and return its name. """ global temp_dir if not keep_temp_dir_p: temp_dir = tempfile.mktemp (program_name) try: os.mkdir (temp_dir, 0700) except OSError: pass return temp_dir | def setup_temp (): """ Create a temporary directory, and return its name. """ global temp_dir if not keep_temp_dir_p: temp_dir = tempfile.mktemp (program_name) try: os.mkdir (temp_dir, 0700) except OSError: pass return temp_dir | 36,450 |
def popen (cmd, mode = 'r', ignore_error = 0): if verbose_p: progress (_ ("Opening pipe `%s\'") % cmd) pipe = os.popen (cmd, mode) if verbose_p: progress ('\n') return pipe | def popen (cmd, mode = 'r', ignore_error = 0): if verbose_p: progress (_ ("Opening pipe `%s\'") % cmd) pipe = os.popen (cmd, mode) if verbose_p: progress ('\n') return pipe | 36,451 |
def system (cmd, ignore_error = 0): """Run CMD. If IGNORE_ERROR is set, don't complain when CMD returns non zero. RETURN VALUE Exit status of CMD """ if verbose_p: progress (_ ("Invoking `%s\'\n") % cmd) st = os.system (cmd) if st: name = re.match ('[ \t]*([^ \t]*)', cmd).group (1) msg = name + ': ' + _ ("command ex... | def system (cmd, ignore_error = 0): """Run CMD. If IGNORE_ERROR is set, don't complain when CMD returns non zero. RETURN VALUE Exit status of CMD """ if verbose_p: progress (_ ("Invoking `%s\'\n") % cmd) st = os.system (cmd) if st: name = re.match ('[ \t]*([^ \t]*)', cmd).group (1) msg = name + ': ' + _ ("command ex... | 36,452 |
def system (cmd, ignore_error = 0): """Run CMD. If IGNORE_ERROR is set, don't complain when CMD returns non zero. RETURN VALUE Exit status of CMD """ if verbose_p: progress (_ ("Invoking `%s\'\n") % cmd) st = os.system (cmd) if st: name = re.match ('[ \t]*([^ \t]*)', cmd).group (1) msg = name + ': ' + _ ("command ex... | defsystem(cmd,ignore_error=0):"""RunCMD.IfIGNORE_ERRORisset,don'tcomplainwhenCMDreturnsnonzero.RETURNVALUEExitstatusofCMD"""ifverbose_p:progress(_("Invoking`%s\'\n")%cmd)st=os.system(cmd)ifst:name=re.match('[\t]*([^\t]*)',cmd).group(1)msg=name+':'+_("commandexitedwithvalue%d")%stifignore_error:warning(msg+''+_("(ignore... | 36,453 |
def strip_extension (f, ext): (p, e) = os.path.splitext (f) if e == ext: e = '' return p + e | def strip_extension (f, ext): (p, e) = os.path.splitext (f) if e == ext: e = '' return p + e | 36,454 |
def strip_extension (f, ext): (p, e) = os.path.splitext (f) if e == ext: e = '' return p + e | def strip_extension (f, ext): (p, e) = os.path.splitext (f) if e == ext: e = '' return p + e | 36,455 |
def strip_extension (f, ext): (p, e) = os.path.splitext (f) if e == ext: e = '' return p + e | def strip_extension (f, ext): (p, e) = os.path.splitext (f) if e == ext: e = '' return p + e | 36,456 |
def strip_extension (f, ext): (p, e) = os.path.splitext (f) if e == ext: e = '' return p + e | def strip_extension (f, ext): (p, e) = os.path.splitext (f) if e == ext: e = '' return p + e | 36,457 |
def strip_extension (f, ext): (p, e) = os.path.splitext (f) if e == ext: e = '' return p + e | defstrip_extension(f,ext):(p,e)=os.path.splitext(f)ife==ext:e=''returnp+e | 36,458 |
def strip_extension (f, ext): (p, e) = os.path.splitext (f) if e == ext: e = '' return p + e | defstrip_extension(f,ext):(p,e)=os.path.splitext(f)ife==ext:e=''returnp+e | 36,459 |
def find_file (nm): for d in include_dirs: p = os.path.join (d, nm) try: f = open (p) return p except IOError: pass p = popen ('kpsewhich %s' % nm).read ()[:-1] # urg. Did I do this ? if dos_kpath_p: orig = p def func(m): return string.lower (m.group(1)) p = string.lower (p) p = re.sub ('^([a-z]):', '/cygdrive/\\1', ... | def find_file (nm): for d in include_dirs: p = os.path.join (d, nm) try: f = open (p) return p except IOError: pass p = popen ('kpsewhich %s' % nm).read ()[:-1] # urg. Did I do this ? if dos_kpath_p: orig = p def func(m): return string.lower (m.group(1)) p = string.lower (p) p = re.sub ('^([a-z]):', '/cygdrive/\\1', ... | 36,460 |
def find_file (nm): for d in include_dirs: p = os.path.join (d, nm) try: f = open (p) return p except IOError: pass p = popen ('kpsewhich %s' % nm).read ()[:-1] # urg. Did I do this ? if dos_kpath_p: orig = p def func(m): return string.lower (m.group(1)) p = string.lower (p) p = re.sub ('^([a-z]):', '/cygdrive/\\1', ... | def find_file (nm): for d in include_dirs: p = os.path.join (d, nm) try: f = open (p) return p except IOError: pass p = popen ('kpsewhich %s' % nm).read ()[:-1] # urg. Did I do this ? if dos_kpath_p: orig = p def func(m): return string.lower (m.group(1)) p = string.lower (p) p = re.sub ('^([a-z]):', '/cygdrive/\\1', ... | 36,461 |
def find_file (nm): for d in include_dirs: p = os.path.join (d, nm) try: f = open (p) return p except IOError: pass p = popen ('kpsewhich %s' % nm).read ()[:-1] # urg. Did I do this ? if dos_kpath_p: orig = p def func(m): return string.lower (m.group(1)) p = string.lower (p) p = re.sub ('^([a-z]):', '/cygdrive/\\1', ... | def find_file (nm): for d in include_dirs: p = os.path.join (d, nm) try: f = open (p) return p except IOError: pass p = popen ('kpsewhich %s' % nm).read ()[:-1] # urg. Did I do this ? if dos_kpath_p: orig = p def func (m): return string.lower (m.group (1)) p = string.lower (p) p = re.sub ('^([a-z]):', '/cygdrive/\\1'... | 36,462 |
def autotrace_command (fn, opts): opts = " " + opts + " --background-color=FFFFFF --output-format=eps --input-format=pbm " return trace_binary + opts + backend_options + " --output-file=char.eps %s " % fn | def autotrace_command (fn, opts): opts = " " + opts + " --background-color=FFFFFF --output-format=eps --input-format=pbm " return trace_binary + opts + backend_options \ + " --output-file=char.eps %s " % fn | 36,463 |
def potrace_command (fn, opts): return trace_binary + opts \ + ' -u %d ' % potrace_scale \ + backend_options + " -q -c --eps --output=char.eps %s " % (fn) | def potrace_command (fn, opts): return trace_binary + opts \ + ' -u %d ' % potrace_scale \ + backend_options \ + " -q -c --eps --output=char.eps %s " % (fn) | 36,464 |
def potrace_command (fn, opts): return trace_binary + opts \ + ' -u %d ' % potrace_scale \ + backend_options + " -q -c --eps --output=char.eps %s " % (fn) | def potrace_command (fn, opts): return trace_binary + opts \ + ' -u %d ' % potrace_scale \ + backend_options + " -q -c --eps --output=char.eps %s " % (fn) | 36,465 |
def potrace_command (fn, opts): return trace_binary + opts \ + ' -u %d ' % potrace_scale \ + backend_options + " -q -c --eps --output=char.eps %s " % (fn) | def potrace_command (fn, opts): return trace_binary + opts \ + ' -u %d ' % potrace_scale \ + backend_options + "-q -c --eps --output=char.eps %s " % (fn) | 36,466 |
def trace_one (pbmfile, id): """ Run tracer, do error handling """ status = system (trace_command (pbmfile, ''), 1) if status == 2: sys.stderr.write ("\nUser interrupt. Exiting\n") sys.exit(2) if status == 0 and keep_temp_dir_p: shutil.copy2 (pbmfile, '%s.pbm' % id) shutil.copy2 ('char.eps', '%s.eps' % id) if statu... | def trace_one (pbmfile, id): """ Run tracer, do error handling """ status = system (trace_command (pbmfile, ''), 1) if status == 2: sys.stderr.write ("\nUser interrupt. Exiting\n") sys.exit(2) if status == 0 and keep_temp_dir_p: shutil.copy2 (pbmfile, '%s.pbm' % id) shutil.copy2 ('char.eps', '%s.eps' % id) if statu... | 36,467 |
def trace_one (pbmfile, id): """ Run tracer, do error handling """ status = system (trace_command (pbmfile, ''), 1) if status == 2: sys.stderr.write ("\nUser interrupt. Exiting\n") sys.exit(2) if status == 0 and keep_temp_dir_p: shutil.copy2 (pbmfile, '%s.pbm' % id) shutil.copy2 ('char.eps', '%s.eps' % id) if statu... | def trace_one (pbmfile, id): """ Run tracer, do error handling """ status = system (trace_command (pbmfile, ''), 1) if status == 2: sys.stderr.write ("\nUser interrupt. Exiting\n") sys.exit (2) if status == 0 and keep_temp_dir_p: shutil.copy2 (pbmfile, '%s.pbm' % id) shutil.copy2 ('char.eps', '%s.eps' % id) if stat... | 36,468 |
def trace_one (pbmfile, id): """ Run tracer, do error handling """ status = system (trace_command (pbmfile, ''), 1) if status == 2: sys.stderr.write ("\nUser interrupt. Exiting\n") sys.exit(2) if status == 0 and keep_temp_dir_p: shutil.copy2 (pbmfile, '%s.pbm' % id) shutil.copy2 ('char.eps', '%s.eps' % id) if statu... | def trace_one (pbmfile, id): """ Run tracer, do error handling """ status = system (trace_command (pbmfile, ''), 1) if status == 2: sys.stderr.write ("\nUser interrupt. Exiting\n") sys.exit(2) if status == 0 and keep_temp_dir_p: shutil.copy2 (pbmfile, '%s.pbm' % id) shutil.copy2 ('char.eps', '%s.eps' % id) if statu... | 36,469 |
def trace_one (pbmfile, id): """ Run tracer, do error handling """ status = system (trace_command (pbmfile, ''), 1) if status == 2: sys.stderr.write ("\nUser interrupt. Exiting\n") sys.exit(2) if status == 0 and keep_temp_dir_p: shutil.copy2 (pbmfile, '%s.pbm' % id) shutil.copy2 ('char.eps', '%s.eps' % id) if statu... | def trace_one (pbmfile, id): """ Run tracer, do error handling """ status = system (trace_command (pbmfile, ''), 1) if status == 2: sys.stderr.write ("\nUser interrupt. Exiting\n") sys.exit(2) if status == 0 and keep_temp_dir_p: shutil.copy2 (pbmfile, '%s.pbm' % id) shutil.copy2 ('char.eps', '%s.eps' % id) if statu... | 36,470 |
def trace_one (pbmfile, id): """ Run tracer, do error handling """ status = system (trace_command (pbmfile, ''), 1) if status == 2: sys.stderr.write ("\nUser interrupt. Exiting\n") sys.exit(2) if status == 0 and keep_temp_dir_p: shutil.copy2 (pbmfile, '%s.pbm' % id) shutil.copy2 ('char.eps', '%s.eps' % id) if statu... | def trace_one (pbmfile, id): """ Run tracer, do error handling """ status = system (trace_command (pbmfile, ''), 1) if status == 2: sys.stderr.write ("\nUser interrupt. Exiting\n") sys.exit(2) if status == 0 and keep_temp_dir_p: shutil.copy2 (pbmfile, '%s.pbm' % id) shutil.copy2 ('char.eps', '%s.eps' % id) if statu... | 36,471 |
def trace_one (pbmfile, id): """ Run tracer, do error handling """ status = system (trace_command (pbmfile, ''), 1) if status == 2: sys.stderr.write ("\nUser interrupt. Exiting\n") sys.exit(2) if status == 0 and keep_temp_dir_p: shutil.copy2 (pbmfile, '%s.pbm' % id) shutil.copy2 ('char.eps', '%s.eps' % id) if statu... | def trace_one (pbmfile, id): """ Run tracer, do error handling """ status = system (trace_command (pbmfile, ''), 1) if status == 2: sys.stderr.write ("\nUser interrupt. Exiting\n") sys.exit(2) if status == 0 and keep_temp_dir_p: shutil.copy2 (pbmfile, '%s.pbm' % id) shutil.copy2 ('char.eps', '%s.eps' % id) if statu... | 36,472 |
def trace_one (pbmfile, id): """ Run tracer, do error handling """ status = system (trace_command (pbmfile, ''), 1) if status == 2: sys.stderr.write ("\nUser interrupt. Exiting\n") sys.exit(2) if status == 0 and keep_temp_dir_p: shutil.copy2 (pbmfile, '%s.pbm' % id) shutil.copy2 ('char.eps', '%s.eps' % id) if statu... | def trace_one (pbmfile, id): """ Run tracer, do error handling """status = system (trace_command (pbmfile, ''), 1)if status == 2: sys.stderr.write ("\nUser interrupt. Exiting\n") sys.exit(2)if status == 0 and keep_temp_dir_p: shutil.copy2 (pbmfile, '%s.pbm' % id) shutil.copy2 ('char.eps', '%s.eps' % id)if status <> 0: ... | 36,473 |
def make_pbm (filename, outname, char_number): """ Extract bitmap from the PK file FILENAME (absolute) using `gf2pbm'. Return FALSE if the glyph is not valid. """ command = "gf2pbm -n %d -o %s %s" %(char_number, outname, filename) status = system (command, ignore_error = 1) return (status == 0) | def make_pbm (filename, outname, char_number): """ Extract bitmap from the PK file FILENAME (absolute) using `gf2pbm'. Return FALSE if the glyph is not valid. """ command = "gf2pbm -n %d -o %s %s" % (char_number, outname, filename) status = system (command, ignore_error = 1) return (status == 0) | 36,474 |
def make_pbm (filename, outname, char_number): """ Extract bitmap from the PK file FILENAME (absolute) using `gf2pbm'. Return FALSE if the glyph is not valid. """ command = "gf2pbm -n %d -o %s %s" %(char_number, outname, filename) status = system (command, ignore_error = 1) return (status == 0) | def make_pbm (filename, outname, char_number): """ Extract bitmap from the PK file FILENAME (absolute) using `gf2pbm'. Return FALSE if the glyph is not valid. """ command = "gf2pbm -n %d -o %s %s" %(char_number, outname, filename) status = system (command, ignore_error = 1) return (status == 0) | 36,475 |
def read_encoding (file): sys.stderr.write(_("Using encoding file: `%s'\n") % file) str = open (file).read () str = re.sub ("%.*", '', str) str = re.sub ("[\n\t \f]+", ' ', str) m = re.search ('/([^ ]+) \[([^\]]+)\] def', str) if not m: raise 'Encoding file invalid.' name = m.group (1) cod = m.group (2) cod = re.sub ... | def read_encoding (file): sys.stderr.write (_ ("Using encoding file: `%s'\n") % file) str = open (file).read () str = re.sub ("%.*", '', str) str = re.sub ("[\n\t \f]+", ' ', str) m = re.search ('/([^ ]+) \[([^\]]+)\] def', str) if not m: raise 'Encoding file invalid.' name = m.group (1) cod = m.group (2) cod = re.su... | 36,476 |
def read_encoding (file): sys.stderr.write(_("Using encoding file: `%s'\n") % file) str = open (file).read () str = re.sub ("%.*", '', str) str = re.sub ("[\n\t \f]+", ' ', str) m = re.search ('/([^ ]+) \[([^\]]+)\] def', str) if not m: raise 'Encoding file invalid.' name = m.group (1) cod = m.group (2) cod = re.sub ... | def read_encoding (file): sys.stderr.write(_("Using encoding file: `%s'\n") % file) str = open (file).read () str = re.sub ("%.*", '', str) str = re.sub ("[\n\t \f]+", ' ', str) m = re.search ('/([^ ]+) \[([^\]]+)\] def', str) if not m: raise 'Encoding file invalid.' name = m.group (1) cod = m.group (2) cod = re.sub ... | 36,477 |
def read_encoding (file): sys.stderr.write(_("Using encoding file: `%s'\n") % file) str = open (file).read () str = re.sub ("%.*", '', str) str = re.sub ("[\n\t \f]+", ' ', str) m = re.search ('/([^ ]+) \[([^\]]+)\] def', str) if not m: raise 'Encoding file invalid.' name = m.group (1) cod = m.group (2) cod = re.sub ... | def read_encoding (file): sys.stderr.write(_("Using encoding file: `%s'\n") % file) str = open (file).read () str = re.sub ("%.*", '', str) str = re.sub ("[\n\t \f]+", ' ', str) m = re.search ('/([^ ]+) \[([^\]]+)\] def', str) if not m: raise 'Encoding file invalid.' name = m.group (1) cod = m.group (2) cod = re.sub ... | 36,478 |
def read_encoding (file): sys.stderr.write(_("Using encoding file: `%s'\n") % file) str = open (file).read () str = re.sub ("%.*", '', str) str = re.sub ("[\n\t \f]+", ' ', str) m = re.search ('/([^ ]+) \[([^\]]+)\] def', str) if not m: raise 'Encoding file invalid.' name = m.group (1) cod = m.group (2) cod = re.sub ... | def read_encoding (file): sys.stderr.write(_("Using encoding file: `%s'\n") % file) str = open (file).read () str = re.sub ("%.*", '', str) str = re.sub ("[\n\t \f]+", ' ', str) m = re.search ('/([^ ]+) \[([^\]]+)\] def', str) if not m: raise 'Encoding file invalid.' name = m.group (1) cod = m.group (2) cod = re.sub ... | 36,479 |
def zip_to_pairs(as): r = [] while as : r.append((as[0], as[1])) as = as[2:] return r | def zip_to_pairs(as): r = [] while as: r.append ((as[0], as[1])) as = as[2:] return r | 36,480 |
def unzip_pairs (tups): l = [] while tups: l = l + list (tups[0]) tups = tups[1:] return l | def unzip_pairs (tups): lst = [] while tups: l = l + list (tups[0]) tups = tups[1:] return l | 36,481 |
def unzip_pairs (tups): l = [] while tups: l = l + list (tups[0]) tups = tups[1:] return l | def unzip_pairs (tups): l = [] while tups: lst = lst + list (tups[0]) tups = tups[1:] return l | 36,482 |
def unzip_pairs (tups): l = [] while tups: l = l + list (tups[0]) tups = tups[1:] return l | def unzip_pairs (tups): l = [] while tups: l = l + list (tups[0]) tups = tups[1:] return lst | 36,483 |
def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0 / magnification (size_y, size_x, off_x, off_y) = map (lambda m, s = inv_scale: m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: retu... | 36,484 |
def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000, 10000, -10000, -10000) while ls and ls[0] != '*u\n': ls = ls[1:] if ls == []: return (... | 36,485 |
def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | 36,486 |
def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | 36,487 |
def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | 36,488 |
def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | 36,489 |
def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | 36,490 |
def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | 36,491 |
def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | 36,492 |
def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | 36,493 |
def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | 36,494 |
def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | 36,495 |
def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | def autotrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x,off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '*u\n': ls = ls[1:] if ls == []: return (bb... | 36,496 |
def potrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x, off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '0 setgray\n': ls = ls[1:] if ls == []: retu... | def potrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0 / magnification (size_y, size_x, off_x, off_y) = map (lambda m, s = inv_scale: m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '0 setgray\n': ls = ls[1:] if ls == []:... | 36,497 |
def potrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x, off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '0 setgray\n': ls = ls[1:] if ls == []: retu... | def potrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x, off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000, 10000, -10000, -10000) while ls and ls[0] != '0 setgray\n': ls = ls[1:] if ls == []: r... | 36,498 |
def potrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x, off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '0 setgray\n': ls = ls[1:] if ls == []: retu... | def potrace_path_to_type1_ops (at_file, bitmap_metrics, tfm_wid): inv_scale = 1000.0/magnification (size_y, size_x, off_x, off_y)= map(lambda m, s=inv_scale : m * s, bitmap_metrics) ls = open (at_file).readlines () bbox = (10000,10000,-10000,-10000) while ls and ls[0] <> '0 setgray\n': ls = ls[1:] if ls == []: retu... | 36,499 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.