[cgma-dev] CGM 13.1 and PyTAPS

Iulian Grindeanu iulian at mcs.anl.gov
Fri Dec 13 12:22:56 CST 2013


It looks like in python there is no equivalent to ifdefs . 
We could simply use an if statement, but we need to have something different for cgm >= 13 
Python is an interpreted language, and we can do something like this: 
import os if os . name == "posix" : def foo ( x ): return x * x else : def foo ( x ): return x + 42 

Now, we need to export somehow the version from iGeom.h / iBase.h, to be visible in pytaps. 

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. 

Any suggestions? 

Iulian 

----- Original Message -----

| Hello,
| Does anybody know how to do ifdefs in python? Or something similar?
| This is what I am using for pytaps built with cgm trunk (actually,
| cgm/tags/13.1.1)
| (you should be able to apply this patch on pytaps source, and use it
| also for trunk version)

| Iulian
| ----- Original Message -----

| | HI
| 

| | I think the iMesh implmentation in CGM13.1 is mismatched for the
| | PyTAPS
| 
| | 1.4, PyTAPS 1.4 failed to build when using CGM 13.1, but is fine
| | with
| 
| | 12.2. The error messages are all code issues regarding mismatched
| 
| | arguments to functions, passing ints when it should be doubles and
| | so
| | on.
| 

| | I figured this should be reported here since I couldnt find PyTAPS
| | dev
| 

| | Thanks
| 

| | Andy
| 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/cgma-dev/attachments/20131213/965e9eb5/attachment.html>


More information about the cgma-dev mailing list