Lines Matching refs:sub
119 return re.sub(pattern,new,self,count)
230 s = re.sub(r"[\n\r]+", ".", s)
235 res += "(" + re.sub(r"[\(\)\\\n\r]", ".", a) + ")\n"
1546 d = "m %s,%s " % (x[0],x[1]) + re.sub("([0-9\-.e]+)",(lambda match: str(float(match.group(1))*size*2.)), "0.88464,-0.40404 c -0.0987,-0.0162 -0.186549,-0.0589 -0.26147,-0.1173 l 0.357342,-0.35625 c 0.04631,-0.039 0.0031,-0.13174 -0.05665,-0.12164 -0.0029,-1.4e-4 -0.0058,-1.4e-4 -0.0087,0 l -2.2e-5,2e-5 c -0.01189,0.004 -0.02257,0.0119 -0.0305,0.0217 l -0.357342,0.35625 c -0.05818,-0.0743 -0.102813,-0.16338 -0.117662,-0.26067 l -0.409636,0.88193 z")
2455 command = re.sub(r"\\\\",":#:#:slash:#:#:",command)
2456 command = re.sub(r"\\;",":#:#:semicolon:#:#:",command)
2459 s = re.sub(":#:#:slash:#:#:","\\\\",s)
2460 s = re.sub(":#:#:semicolon:#:#:","\\;",s)
2483 self.gcode += eval( "re.sub(%s,line)"%parameters) +"\n"
2486 self.error("Bad parameters for regexp. They should be as re.sub pattern and replacement parameters! For example: r\"G0(\d)\", r\"G\\1\" \n(Parameters: '%s')\n %s"%(parameters, ex), "error")
2527 s_wo_comments = re.sub(r"\([^\)]*\)","",s)
2548 s = re.sub(r"(?i)("+a+r")\s*(-?)\s*(\d*\.?\d*)", r"\1 %f"%(float(r.group(2)+r.group(3))*scale[i]+(move[i] if a not in ["i","j","k"] else 0) ), s)
2554 s = re.sub(r"(?i)(r)\s*(-?)\s*(\d*\.?\d*)", r"\1 %f"%( float(r.group(2)+r.group(3))*r_scale ), s)
2572 s_wo_comments = re.sub(r"\([^\)]*\)","",s)
2630 s = re.sub(r"(?i)(F)\s*(-?)\s*(\d*\.?\d*)", "F [%s]"%feeds[float(r.group(2)+r.group(3))], s)
2635 s = re.sub(r"(?i)("+c+r")\s*((-?)\s*(\d*\.?\d*))", r"\1[\2*%s+%s]"%(scale[c],offset[c]), s)
2641 s = re.sub(r"(?i)("+c+r")\s*((-?)\s*(\d*\.?\d*))", r"\1[\2*%s]"%scale[c], s)
2660 s = re.sub(
3939 g += ( "(Change tool to %s)\n" % re.sub("\"'\(\)\\\\"," ",tool["name"]) ) + tool["tool change gcode"] + "\n"
4565 comment = re.sub("\[([A-Za-z_\-\:]+)\]", partial(set_comment, path=path), self.options.comment_gcode)
4805 d = re.sub(r'(?i)(m[^mz]+)',r'\1 Z ',d)
4806 d = re.sub(r'(?i)\s*z\s*z\s*',r' Z ',d)
4807 d = re.sub(r'(?i)\s*([A-Za-z])\s*',r' \1 ',d)
5670 for p in nlLT[-1]: #For last sub-path
6104 x = re.sub("^\s*([XYZxyz])\s*$",r"\1",x)
6105 z = re.sub("^\s*([XYZxyz])\s*$",r"\1",z)
6128 gcode += ( "(Change tool to %s)\n" % re.sub("\"'\(\)\\\\"," ",self.tool["name"]) ) + self.tool["tool change gcode"] + "\n"
6488 gcode += ( "(Change tool to %s)\n" % re.sub("\"'\(\)\\\\"," ",self.tool["name"]) ) + self.tool["tool change gcode"] + "\n"