<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Andy, Iulian,<br>
    <br>
    I've added Anthony Scopatz into this conversation, as he has a
    growing interest in PyTAPS.  He is also a python expert.  I'm not
    sure if he is on the CGMA list yet.<br>
    <br>
    <nudge>Tim was also planning to move it to bitbucket soon
    (last month?) to facilitate collaborative development </nudge><br>
    <br>
    Paul<br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 12/13/2013 12:22 PM, Iulian
      Grindeanu wrote:<br>
    </div>
    <blockquote
      cite="mid:1795201526.19024791.1386958976528.JavaMail.root@mcs.anl.gov"
      type="cite">
      <style type="text/css">p { margin: 0; }</style>
      <div style="font-family: times new roman,new york,times,serif;
        font-size: 12pt; color: #000000">It looks like in python there
        is no equivalent to ifdefs. <br>
        We could simply use an if statement, but we need to have
        something different for cgm >= 13<br>
        Python is an interpreted language, and we can do something like
        this:<br>
        <pre style="" class="lang-py prettyprint prettyprinted"><code><span class="kwd">import</span><span class="pln"> os

</span><span class="kwd">if</span><span class="pln"> os</span><span class="pun">.</span><span class="pln">name </span><span class="pun">==</span><span class="pln"> </span><span class="str">"posix"</span><span class="pun">:</span><span class="pln">
    </span><span class="kwd">def</span><span class="pln"> foo</span><span class="pun">(</span><span class="pln">x</span><span class="pun">):</span><span class="pln">
        </span><span class="kwd">return</span><span class="pln"> x </span><span class="pun">*</span><span class="pln"> x
</span><span class="kwd">else</span><span class="pun">:</span><span class="pln">
    </span><span class="kwd">def</span><span class="pln"> foo</span><span class="pun">(</span><span class="pln">x</span><span class="pun">):</span><span class="pln">
        </span><span class="kwd">return</span><span class="pln"> x </span><span class="pun">+</span><span class="pln"> </span><span class="lit">42

</span></code></pre>
        Now, we need to export somehow the version from iGeom.h /
        iBase.h, to be visible in pytaps.<br>
        <br>
        Another solution is to create an svn branch for pytaps too (I
        prefer not to, because there is not much difference, so far) And
        as long as iGeom.h does not change, we do not really need
        different branches.<br>
        <br>
         Any suggestions?<br>
        <br>
        Iulian<br>
        <br>
        <hr id="zwchr">
        <blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">
          <style>p { margin: 0; }</style>
          <div style="font-family: times new roman,new york,times,serif;
            font-size: 12pt; color: #000000">Hello,<br>
            Does anybody know how to do ifdefs in python? Or something
            similar? <br>
            This is what I am using for pytaps built with cgm trunk
            (actually, cgm/tags/13.1.1)<br>
            (you should be able to apply this patch on pytaps source,
            and use it also for trunk version)<br>
            <br>
            Iulian<br>
            <hr id="zwchr">
            <blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">HI<br>
              <br>
              I think the iMesh implmentation in CGM13.1 is mismatched
              for the PyTAPS <br>
              1.4, PyTAPS 1.4 failed to build when using CGM 13.1, but
              is fine with <br>
              12.2. The error messages are all code issues regarding
              mismatched <br>
              arguments to functions, passing ints when it should be
              doubles and so on.<br>
              <br>
              I figured this should be reported here since I couldnt
              find PyTAPS dev<br>
              <br>
              Thanks<br>
              <br>
              Andy<br>
              <br>
            </blockquote>
            <br>
          </div>
        </blockquote>
        <br>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
-- ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ --
Paul Wilson ~ UW-Madison ~ 608-263-0807 ~ cal: <a class="moz-txt-link-freetext" href="http://bit.ly/pphw-cal">http://bit.ly/pphw-cal</a>
Professor, Engineering Physics. ~ <a class="moz-txt-link-freetext" href="http://cnerg.engr.wisc.edu">http://cnerg.engr.wisc.edu</a>
Faculty Director, Advanced Computing Infrastructure</pre>
  </body>
</html>