Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)
Takes a language ID and fetches an appropriate file extension string
@param ext_id: language id to get extension for
@return: file extension

        def GetExtFromId(ext_id):
    """Takes a language ID and fetches an appropriate file extension string
    @param ext_id: language id to get extension for
    @return: file extension

    """
    extreg = ExtensionRegister()
    ftype = synglob.GetDescriptionFromId(ext_id)
    rval = u''
    if len(extreg[ftype]):
        rval = extreg[ftype][0]
    return rval
        


src/e/i/einstein-HEAD/Python25Einstein/Lib/site-packages/wx-2.8-msw-unicode/wx/tools/Editra/src/ed_stc.py   einstein(Download)
            self.SetIndentationGuides(not bool(self.GetIndentationGuides()))
        elif e_id in syntax.SyntaxIds():
            f_ext = syntax.GetExtFromId(e_id)
            self.LOG("[stc_evt] Manually Setting Lexer to %s" % str(f_ext))
            self.FindLexer(f_ext)

src/e/d/Editra-0.7.20/src/ed_stc.py   Editra(Download)
            self.SetCaretLineVisible(not self.GetCaretLineVisible())
        elif e_id in syntax.SYNTAX_IDS:
            f_ext = syntax.GetExtFromId(e_id)
            self.LOG("[ed_stc][evt] Manually Setting Lexer to %s" % str(f_ext))
            self.FindLexer(f_ext)

src/e/d/Editra-0.7.20/tests/unittests/testSyntaxFunctions.py   Editra(Download)
    def testGetExtensionFromId(self):
        """Test getting a file extension from a language id"""
        ext = syntax.GetExtFromId(synglob.ID_LANG_PYTHON)
        self.assertTrue(isinstance(ext, basestring))