Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Cython -a flag (to generate yellow-shaded HTML) without command line

Received: by 10.205.134.138 with SMTP id ic10mr1518446bkc.8.1339958546938;
        Sun, 17 Jun 2012 11:42:26 -0700 (PDT)
X-BeenThere: cython-users@googlegroups.com
Received: by 10.204.154.7 with SMTP id m7ls2796470bkw.5.gmail; Sun, 17 Jun
 2012 11:42:23 -0700 (PDT)
Received: by 10.204.141.4 with SMTP id k4mr1513353bku.6.1339958543726;
        Sun, 17 Jun 2012 11:42:23 -0700 (PDT)
Received: by 10.204.141.4 with SMTP id k4mr1513351bku.6.1339958543702;
        Sun, 17 Jun 2012 11:42:23 -0700 (PDT)
Return-Path: <ian.h.b...@gmail.com>
Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com [209.85.217.176])
        by gmr-mx.google.com with ESMTPS id hy18si12566127bkc.2.2012.06.17.11.42.23
        (version=TLSv1/SSLv3 cipher=OTHER);
        Sun, 17 Jun 2012 11:42:23 -0700 (PDT)
Received-SPF: pass (google.com: domain of ian.h.b...@gmail.com designates 209.85.217.176 as permitted sender) client-ip=209.85.217.176;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ian.h.b...@gmail.com designates 209.85.217.176 as permitted sender) smtp.mail=ian.h.b...@gmail.com; dkim=pass header...@gmail.com
Received: by lboj14 with SMTP id j14so3375782lbo.7
        for <cython-users@googlegroups.com>; Sun, 17 Jun 2012 11:42:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:in-reply-to:references:from:date:message-id:subject:to
         :content-type;
        bh=OvN9MYfkz+KJrIKIyTmGV6AaxspUgBhuw1EXysjXRAI=;
        b=AcqZ8rWeX4x6vyq5Hez5Sv5yZbs3MWW5B5p396Jo4sJcxnS9etOV/ZS1eF0kBvzWNL
         /xAxozvWgdL05TkbdSaBajuPI43XKXrKJREpSWh0wmV1xHvhyAm3so5P0K/gXuddzMpV
         48IkllfWg4G+xKJJqMPy2uu+0KWHg2prlMTeYlSdWFFacQ1H1I7TehEb+zJl6kWVjor7
         y/Ly3aPUccyLiqDmtW1qaZI44eT7gAoPJsw50s8wFar7N2eECD4vQ621/VW7vESYpDCG
         aCO7i+jDgNyqnWU8HKBz6CiBxWvdItme/z17njVlqmHC4kW8oy6t2OFXR1Uea2PMkjGI
         fBzA==
Received: by 10.112.26.131 with SMTP id l3mr5419422lbg.80.1339958543251; Sun,
 17 Jun 2012 11:42:23 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.112.18.200 with HTTP; Sun, 17 Jun 2012 11:41:43 -0700 (PDT)
In-Reply-To: <4FDE17A1.5050...@behnel.de>
References: <8cdfc0f1-ffb8-4263-a908-5b3d73799707@googlegroups.com> <4FDE17A1.5050...@behnel.de>
From: Ian Bell <ian.h.b...@gmail.com>
Date: Sun, 17 Jun 2012 11:41:43 -0700
Message-ID: <CAJQnXJeXVbRMV3iJV6YqAe_kMZoUmT811Tdv2pJvE=0+t0n...@mail.gmail.com>
Subject: Re: [cython-users] Cython -a flag (to generate yellow-shaded HTML)
 without command line
To: cython-users@googlegroups.com
Content-Type: multipart/alternative; boundary=bcaec55555a4fbfb1604c2af680b

--bcaec55555a4fbfb1604c2af680b
Content-Type: text/plain; charset=ISO-8859-1

On Sun, Jun 17, 2012 at 10:45 AM, Stefan Behnel <stefan...@behnel.de> wrote:

> SteveB, 17.06.2012 19:34:
> > (copied from
> >
> http://stackoverflow.com/questions/11058933/cython-a-flag-to-generate-yellow-shaded-html-without-command-line
> > )
> >
> > When you run from the command prompt "cython -a ..." you get a really
> nice
> > HTML file with yellow shading to indicate slow python operations vs fast
> C
> > operations. You also get this same HTML file as a link every time you
> > compile Cython code in Sage. My questions are: (1) Can I get this HTML
> file
> > if I'm compiling using distutils?
>
> Yes, pass "annotate=True" into cythonize().
>

Or if not using cythonize(), you can set the flag

Cython.Compiler.Options.annotate = True

which is not documented anywhere as far as I can see

--bcaec55555a4fbfb1604c2af680b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On Sun, Jun 17, 2012 at 10:45 AM, Stefan=
 Behnel <span dir=3D"ltr">&lt;<a href=3D"mailto:stefan...@behnel.de" target=
=3D"_blank">stefan...@behnel.de</a>&gt;</span> wrote:<br><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">

SteveB, 17.06.2012 19:34:<br>
<div class=3D"im">&gt; (copied from<br>
&gt; <a href=3D"http://stackoverflow.com/questions/11058933/cython-a-flag-t=
o-generate-yellow-shaded-html-without-command-line" target=3D"_blank">http:=
//stackoverflow.com/questions/11058933/cython-a-flag-to-generate-yellow-sha=
ded-html-without-command-line</a><br>


&gt; )<br>
&gt;<br>
&gt; When you run from the command prompt &quot;cython -a ...&quot; you get=
 a really nice<br>
&gt; HTML file with yellow shading to indicate slow python operations vs fa=
st C<br>
&gt; operations. You also get this same HTML file as a link every time you<=
br>
&gt; compile Cython code in Sage. My questions are: (1) Can I get this HTML=
 file<br>
&gt; if I&#39;m compiling using distutils?<br>
<br>
</div>Yes, pass &quot;annotate=3DTrue&quot; into cythonize().<br></blockquo=
te><div><br>Or if not using cythonize(), you can set the flag=A0 <br><br>Cy=
thon.Compiler.Options.annotate =3D True<br><br>which is not documented anyw=
here as far as I can see<br>

<br></div></div>

--bcaec55555a4fbfb1604c2af680b--