Does anybody know what could cause BaseOSError (10) while creating a
STAFHandle object? The exception result message is not provided. Here
is my Python code example:
$ export LOCAL_BUILD_STAF_HOME=/Users/mykola/Downloads/staf/rel/macosx/
staf/retail
$ export PYTHONPATH=$LOCAL_BUILD_STAF_HOME/lib/
python26:$LOCAL_BUILD_STAF_HOME/lib:$PYTHONPATH
$ export VERSIONER_PYTHON_PREFER_32_BIT=yes
$ python
Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from PySTAF import *
>>> import sys
>>> try:
... handle=STAFHandle("Lang/Python/Test/Basic")
... except STAFException, e:
... print "Error %d - %s" % (e.rc, e.result)
...
Error 10 -
I was wondering if anybody knows how to fix it?
Here is a bit more details on what version of STAF I am using. The
STAF 3.4.1 comes with a Python 2.3 library. It did not work on my Mac
with Python 2.6. Therefore, I've built the library myself.
I installed XCode (xcode321_10m2003_developerdvd.dmg) from the Apple
developers site. I downloaded STAF341-src.tar and extracted it to /
Users/mykola/Downloads/staf/ folder. Here is the script I run to build
STAF Python library
cd ~/Downloads/staf/src/staf
OS_NAME=macosx
BUILD_ARCH=i386
BUILD_TYPE=retail
CC_NAME=gcc
STAF_USE_SSL=
OSTYPE=darwin9.0
PYTHON_BUILD_V23=0
PYTHON_BUILD_V25=0
PYTHON_BUILD_V26=1
PYTHON_V26_ROOT=/System/Library/Frameworks/Python.framework/Versions/2.6
PYTHON_V26_INCLUDEDIRS=$PYTHON_V26_ROOT/include/python2.6
PYTHON_V26_LIBDIRS=$PYTHON_V26_ROOT/lib/python2.6
PYTHON_V26_LIBS=python2.6
PYTHON_ROOT=$PYTHON_V26_ROOT
PYTHON_INCLUDEDIRS=$PYTHON_V26_INCLUDEDIRS
PYTHON_LIBDIRS=$PYTHON_V26_LIBDIRS
PYTHON_LIBS=$PYTHON_V26_LIBS
STAFHOME=.
LD_LIBRARY_PATH=$PYTHON_V26_LIBDIRS/config/libpython2.6.a
STAF_USE_IPV6=
export VERSIONER_PYTHON_PREFER_32_BIT=yes
export PROJECTS OS_NAME BUILD_ARCH BUILD_TYPE PYTHON_ROOT
PYTHON_INCLUDEDIRS CC_NAME STAF_USE_SSL OSTYPE PYTHON_BUILD_V23
PYTHON_BUILD_V\
25 PYTHON_BUILD_V26 PYTHON_V26_ROOT PYTHON_V26_INCLUDEDIRS
PYTHON_V26_LIBDIRS PYTHON_V26_LIBS PYTHON_ROOT PYTHON_INCLUDEDIRS
PYTHON_LIBD\
IRS PYTHON_LIBS LD_LIBRARY_PATH STAF_USE_IPV6
export PROJECTS=staf
make -B
export PROJECTS=connprov*
make -B
export PROJECTS=python
make -B
The build was successful. I've got this library:
$ ls -l ../../rel/macosx/staf/retail/lib/python26/
total 40
-rwxr-xr-x 1 mykola staff 16632 Apr 2 11:29 PYSTAF.so
Am I missing something?
Thank you,
- Mykola
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
staf-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/staf-users