A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-July/015847.html below:

[Python-Dev] Silly little benchmark

[Python-Dev] Silly little benchmark [Python-Dev] Silly little benchmarkSkip Montanaro skip@pobox.com (Skip Montanaro)
Tue, 10 Jul 2001 21:30:39 -0500
    >> I can tell by the startup message that it was compiled with gcc
    >> 2.95.3, but not what optimization flags were used.

    Guido> If you did a full "make install" then and the results are still
    Guido> around, look in <prefix>/lib/python1.6/config/Makefile .

Thanks for the tip.  Since I just rebuilt 1.6 this evening I wiped out
whatever was there from last June.  Still, I now have that information at my
fingertips:

    def getbuildinfo():
        import sys, re, string
        makefile = "%s/lib/python%d.%d/config/Makefile" % \
                   (sys.prefix, sys.version_info[0], sys.version_info[1])
        f = open(makefile)
        pat = re.compile("^([A-Z_]+)\s*=\s*(.*)")
        lines = f.readlines()
        opts = {}
        for line in lines:
            mat = pat.match(line)
            if mat:
                name = mat.group(1)
                val = string.strip(mat.group(2))
                opts[name] = val
        return opts

Skip




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4