Coral App and Python

81 views
Skip to first unread message

alexander pena

unread,
Mar 14, 2012, 7:22:07 PM3/14/12
to coral-app
Dear Coral App developers,

Thank you for coral, it is an amazing application, with great
potential.

I have a problem and thought I might pick your brains on this one: how
would you go about making the Coral App Standalone use the python
version that is already available in the users system

I am trying to write a python node that uses PythonOCC a python
wrapper for the OpenCascade BRep engine, it seems the pythonOCC
modules where built using swig for 32 bit version of python 2.6 but
the coral app uses its own python2.6 built for amd 64 bit targets, and
when I install the site-packages of pythonOCC on the embedded version
of python shipped with coral, and import the pythonOCC modules from
the coral script editor, I am getting an error:

command executed:
from OCC import *

error message:

Traceback (most recent call last):
File "C:\Program Files\Coral\Coral 0.0.2\apps\coralStandalone\coral
\coralUi\scriptEditor.py", line 110, in _executeScript
coralApp.__dict__ # allows for a script to run every coralApp
function without the coralApp module being imported
File "<string>", line 1, in <module>
File "C:\Program Files\Coral\Coral 0.0.2\python\lib\site-packages\OCC
\Standard.py", line 28, in <module>
_Standard = swig_import_helper()
File "C:\Program Files\Coral\Coral 0.0.2\python\lib\site-packages\OCC
\Standard.py", line 24, in swig_import_helper
_mod = imp.load_module('_Standard', fp, pathname, description)
ImportError: DLL load failed: %1 is not a valid Win32 application.


Another question : is it possible to build Coral without the use of
Scons, but maybe with Cmake or visual studio?

Thank You for the help

Alex



Nicholas Yue

unread,
Mar 14, 2012, 7:33:49 PM3/14/12
to cora...@googlegroups.com
On 15/03/12 10:22, alexander pena wrote:
> Dear Coral App developers,
>
> Thank you for coral, it is an amazing application, with great
> potential.
>
> I have a problem and thought I might pick your brains on this one: how
> would you go about making the Coral App Standalone use the python
> version that is already available in the users system
Hi Alex,

The compiled python module for _coral.pyd and _coralUi.pyd are
built using 64bit compilers.

For 32 bit compatibility with OCC, you will have to build coral
with a 32 bit compiler so that pythonOCC can import the Coral module.

> Another question : is it possible to build Coral without the use of
> Scons, but maybe with Cmake or visual studio?

Yes it is possible.

If you need custom build of Coral, Procedural Insight Pty. Ltd. can
provide the service. Contact me off-list.

Regards

--
Nicholas Yue
Graphics - RenderMan, Visualization, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
Management - Recruitment, career management
http://www.proceduralinsight.com/
http://au.linkedin.com/in/nicholasyue

Dorian Fevrier

unread,
Mar 14, 2012, 7:39:09 PM3/14/12
to cora...@googlegroups.com
Hi!

Coral should be able to work with any other python module. Coral is
actually a python module himself. :)

The problem you have seems to be a 32/64bits problem.

What I suggest is to play with python path variable:

http://www.johnny-lin.com/cdat_tips/tips_pylang/path.html

http://blenderartists.org/forum/showthread.php?7412-How-to-set-your-PYTHONPATH-101

So be sure to have every libs (python, coral, PythonOCC) for the same
platform (PythonOCC seems to be only 32bits) and it should be ok.

I don't know if there is a 32bits build for coral... :(

Good luck!


Le 15/03/2012 00:22, alexander pena a �crit :

Dorian Fevrier

unread,
Mar 14, 2012, 8:32:59 PM3/14/12
to cora...@googlegroups.com
Burned by Nicholas... ^^'


Le 15/03/2012 00:39, Dorian Fevrier a �crit :

alexander pena

unread,
Mar 15, 2012, 7:29:37 PM3/15/12
to coral-app
Thank you all for your suggestions.

Best,

Alex



On Mar 15, 11:32 am, Dorian Fevrier <fevrier.dor...@yahoo.fr> wrote:
> Burned by Nicholas... ^^'
>
> Le 15/03/2012 00:39, Dorian Fevrier a crit :
>
>
>
>
>
>
>
> > Hi!
>
> > Coral should be able to work with any other python module. Coral is
> > actually a python module himself. :)
>
> > The problem you have seems to be a 32/64bits problem.
>
> > What I suggest is to play with python path variable:
>
> >http://www.johnny-lin.com/cdat_tips/tips_pylang/path.html
>
> >http://blenderartists.org/forum/showthread.php?7412-How-to-set-your-P...
Reply all
Reply to author
Forward
0 new messages