def select_pen(self, gc):
pen=EMFPen(self.emf,gc)<EOL>key=hash(pen)<EOL>handle=self._fontHandle.get(key)<EOL>if handle is None:<EOL><INDENT>handle=pen.get_handle()<EOL>self._fontHandle[key]=handle<EOL><DEDENT>if debugHandle: print("<STR_LIT>" % handle)<EOL>self.set_handle("<STR_LIT>",handle)<EOL>if pen.style != pyemf.PS_NULL:<EOL><INDENT>return pen<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
Select a pen that includes the color, line width and line
style.  Return the pen if it will draw a line, or None if the
pen won't produce any output (i.e. the style is PS_NULL)