diff options
-rw-r--r-- | externals/grill/py/py.vcproj | 4 | ||||
-rw-r--r-- | externals/grill/py/readme.txt | 72 | ||||
-rw-r--r-- | externals/grill/py/source/pyext.cpp | 11 |
3 files changed, 47 insertions, 40 deletions
diff --git a/externals/grill/py/py.vcproj b/externals/grill/py/py.vcproj index d82a132f..5ad7f1bf 100644 --- a/externals/grill/py/py.vcproj +++ b/externals/grill/py/py.vcproj @@ -85,7 +85,7 @@ <Tool Name="VCCLCompilerTool" Optimization="0" - AdditionalIncludeDirectories="c:\programme\audio\pd-0.39-0\src;..\flext\source;c:\programme\prog\Python24\include" + AdditionalIncludeDirectories="c:\programme\audio\pd-0.39-1\src;..\flext\source;c:\programme\prog\Python24\include" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;PY_EXPORTS;FLEXT_SYS=2;FLEXT_THREADS;PY_NUMARRAY" BasicRuntimeChecks="3" RuntimeLibrary="1" @@ -105,7 +105,7 @@ OutputFile="$(outdir)/py.dll" LinkIncremental="1" SuppressStartupBanner="TRUE" - AdditionalLibraryDirectories=""C:\data\prog\packs\Python-2.4\PCbuild";"c:/data/pd/pd-cvs/bin"" + AdditionalLibraryDirectories=""C:\data\prog\packs\Python-2.4\PCbuild";"c:/programme/audio/pd-0.39-1/bin"" GenerateDebugInformation="TRUE" ProgramDatabaseFile="$(outdir)/py.pdb" SubSystem="2" diff --git a/externals/grill/py/readme.txt b/externals/grill/py/readme.txt index dcd10461..805b1d35 100644 --- a/externals/grill/py/readme.txt +++ b/externals/grill/py/readme.txt @@ -9,6 +9,45 @@ Visit https://www.paypal.com/xclick/business=gr%40grrrr.org&item_name=pyext&no_n ---------------------------------------------------------------------------- +You need to have Python installed on your system for the py/pyext external to work. +For Windows pick an up-to-date package from http://www.python.org . +For linux use the package manager. +For OS X keep things as the are - it has Python installed by default. + + +The py/pyext package should run with Python version >= 2.1. +It has been thoroughly tested with versions 2.2 to 2.4 + +---------------------------------------------------------------------------- + +Goals/features of the package: + +Access the flexibility of the python language in PD and MaxMSP + + +PD - Load it as i library with e.g. "pd -lib py -path scripts" + + + +Check out the sample patches and scripts + + +Description: + +With the py object you can load python modules and execute the functions therein. +With the pyext you can use python classes to represent full-featured pd/Max message objects. +Multithreading (detached methods) is supported for both objects. +You can send messages to named objects or receive (with pyext) with Python methods. + + +Known bugs: +- The TCL/TK help patch is not usable under OSX. +- With standard PD 0.37, threaded py scripts will cause "Stack overflows" under some circumstances + -> use PD 0.38 or the devel_0_37 cvs branch instead +- It has been reported that pyext crashes on AMD64 with SSE enabled (for these CPUs, disable the respective compiler flags) + +---------------------------------------------------------------------------- + BUILDING from source -------------------- @@ -51,39 +90,6 @@ to avoid a compile-time type definition clash. ---------------------------------------------------------------------------- -Goals/features of the package: - -Access the flexibility of the python language in PD and MaxMSP - - -PD - Load it as i library with e.g. "pd -lib py -path scripts" - - - -Check out the sample patches and scripts - - -Description: - -With the py object you can load python modules and execute the functions therein. -With the pyext you can use python classes to represent full-featured pd/Max message objects. -Multithreading (detached methods) is supported for both objects. -You can send messages to named objects or receive (with pyext) with Python methods. - - -Known bugs: -- The TCL/TK help patch is not usable under OSX. -- With standard PD 0.37, threaded py scripts will cause "Stack overflows" under some circumstances - -> use PD 0.38 or the devel_0_37 cvs branch instead -- It has been reported that pyext crashes on AMD64 with SSE enabled (for these CPUs, disable the respective compiler flags) - ----------------------------------------------------------------------------- - -The py/pyext package should run with Python version >= 2.1. -It has been thoroughly tested with versions 2.2 to 2.4 - ----------------------------------------------------------------------------- - Version history: 0.2.1: diff --git a/externals/grill/py/source/pyext.cpp b/externals/grill/py/source/pyext.cpp index 91be31e0..b3cafb8a 100644 --- a/externals/grill/py/source/pyext.cpp +++ b/externals/grill/py/source/pyext.cpp @@ -251,9 +251,12 @@ bool pyext::DoInit() if(init) { if(PyMethod_Check(init)) { PyObject *res = PyObject_CallObject(init,pargs); - if(!res) + if(!res) { // exception is set ok = false; + // we want to know why __init__ failed... + PyErr_Print(); + } else Py_DECREF(res); } @@ -281,10 +284,8 @@ void pyext::DoExit() PyObject *ret = PyObject_CallObject(objdel,NULL); if(ret) Py_DECREF(ret); -#ifdef FLEXT_DEBUG - else - post("%s - Could not call _del method",thisName()); -#endif + else + PyErr_Print(); Py_DECREF(objdel); } else |