diff options
Diffstat (limited to 'externals/grill/py')
-rw-r--r-- | externals/grill/py/pd/attr-1.pd | 32 | ||||
-rw-r--r-- | externals/grill/py/py.dsp | 229 | ||||
-rw-r--r-- | externals/grill/py/source/bound.cpp | 3 |
3 files changed, 35 insertions, 229 deletions
diff --git a/externals/grill/py/pd/attr-1.pd b/externals/grill/py/pd/attr-1.pd new file mode 100644 index 00000000..3a870839 --- /dev/null +++ b/externals/grill/py/pd/attr-1.pd @@ -0,0 +1,32 @@ +#N canvas 114 127 683 413 12;
+#X obj 224 370 pyext simple ex3;
+#X obj 365 370 print A;
+#X msg 252 180 get tmp;
+#X msg 369 210 get _inlets;
+#X msg 253 204 set tmp 3;
+#X msg 368 234 set _inlets 4;
+#X msg 18 179 dir;
+#X msg 15 282 getattributes;
+#X msg 15 309 getmethods;
+#X msg 18 207 dir+;
+#X text 15 48 This demonstrates the usage of attributes. See the simple.py
+file.;
+#X text 252 161 access a class variable;
+#X text 368 191 try to get/set internal stuff;
+#X text 479 234 (NOT allowed!);
+#X text 16 15 py/pyext - Python script objects \, (C)2003 Thomas Grill
+;
+#X text 16 261 get attributes and methods;
+#X text 51 178 Python module dict;
+#X text 59 208 Python class dict;
+#X text 17 101 All attribute-related methods dump eventual output to
+the attribute outlet (which is the right-most one);
+#X connect 0 1 1 0;
+#X connect 2 0 0 0;
+#X connect 3 0 0 0;
+#X connect 4 0 0 0;
+#X connect 5 0 0 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X connect 9 0 0 0;
diff --git a/externals/grill/py/py.dsp b/externals/grill/py/py.dsp deleted file mode 100644 index d6613064..00000000 --- a/externals/grill/py/py.dsp +++ /dev/null @@ -1,229 +0,0 @@ -# Microsoft Developer Studio Project File - Name="py" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** NICHT BEARBEITEN ** - -# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 - -CFG=py - Win32 Threads Debug -!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE -!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl -!MESSAGE -!MESSAGE NMAKE /f "py.mak". -!MESSAGE -!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben -!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: -!MESSAGE -!MESSAGE NMAKE /f "py.mak" CFG="py - Win32 Threads Debug" -!MESSAGE -!MESSAGE Für die Konfiguration stehen zur Auswahl: -!MESSAGE -!MESSAGE "py - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE "py - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE "py - Win32 Threads Release" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE "py - Win32 Threads Debug" (basierend auf "Win32 (x86) Dynamic-Link Library") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "py" -# PROP Scc_LocalPath "." -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "py - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "pd-msvc\r" -# PROP Intermediate_Dir "pd-msvc\r" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PY_EXPORTS" /YX /FD /c -# ADD CPP /nologo /W3 /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0xc07 /d "NDEBUG" -# ADD RSC /l 0xc07 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /libpath:"c:/programme/audio/pd/bin" /libpath:"..\flext\pd-msvc" /libpath:"C:\Programme\prog\Python22\libs" - -!ELSEIF "$(CFG)" == "py - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "pd-msvc\d" -# PROP Intermediate_Dir "pd-msvc\d" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PY_EXPORTS" /YX /FD /GZ /c -# ADD CPP /nologo /W3 /Gm /GR /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0xc07 /d "_DEBUG" -# ADD RSC /l 0xc07 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib pd.lib flext_d-pdwin.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"c:/programme/audio/pd/bin" /libpath:"..\flext\pd-msvc" /libpath:"f:\prog\packs\Python-2.2.1\PCbuild" - -!ELSEIF "$(CFG)" == "py - Win32 Threads Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "py___Win32_Threads_Release" -# PROP BASE Intermediate_Dir "py___Win32_Threads_Release" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "pd-msvc\tr" -# PROP Intermediate_Dir "pd-msvc\tr" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GR /GX /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /D "FLEXT_THREADS" /YX /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0xc07 /d "NDEBUG" -# ADD RSC /l 0xc07 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /libpath:"c:/programme/audio/pd/bin" /libpath:"..\flext\msvc" /libpath:"C:\Programme\prog\Python22\libs" -# ADD LINK32 kernel32.lib user32.lib pd.lib flext_t-pdwin.lib pthreadVC.lib /nologo /dll /machine:I386 /out:"pd-msvc\py.dll" /libpath:"c:/programme/audio/pd/bin" /libpath:"..\flext\pd-msvc" /libpath:"C:\Programme\prog\Python22\libs" - -!ELSEIF "$(CFG)" == "py - Win32 Threads Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "py___Win32_Threads_Debug" -# PROP BASE Intermediate_Dir "py___Win32_Threads_Debug" -# PROP BASE Ignore_Export_Lib 0 -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "pd-msvc\td" -# PROP Intermediate_Dir "pd-msvc\td" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /FR /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /D "FLEXT_THREADS" /FR /YX /FD /GZ /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 -# ADD BASE RSC /l 0xc07 /d "_DEBUG" -# ADD RSC /l 0xc07 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"c:/programme/audio/pd/bin" /libpath:"..\flext\msvc-debug" /libpath:"f:\prog\packs\Python-2.2.1\PCbuild" -# ADD LINK32 kernel32.lib user32.lib pd.lib flext_td-pdwin.lib pthreadVC.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /libpath:"c:/programme/audio/pd/bin" /libpath:"..\flext\pd-msvc" /libpath:"f:\prog\packs\Python-2.2.1\PCbuild" - -!ENDIF - -# Begin Target - -# Name "py - Win32 Release" -# Name "py - Win32 Debug" -# Name "py - Win32 Threads Release" -# Name "py - Win32 Threads Debug" -# Begin Group "scripts" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\scripts\script.py -# End Source File -# Begin Source File - -SOURCE=.\scripts\sendrecv.py -# End Source File -# Begin Source File - -SOURCE=.\scripts\simple.py -# End Source File -# Begin Source File - -SOURCE=.\scripts\tcltk.py -# End Source File -# Begin Source File - -SOURCE=.\scripts\threads.py -# End Source File -# End Group -# Begin Group "doc" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\gpl.txt -# End Source File -# Begin Source File - -SOURCE=.\license.txt -# End Source File -# Begin Source File - -SOURCE=.\readme.txt -# End Source File -# End Group -# Begin Source File - -SOURCE=.\source\bound.cpp -# End Source File -# Begin Source File - -SOURCE=.\source\clmeth.cpp -# End Source File -# Begin Source File - -SOURCE=.\source\main.cpp -# End Source File -# Begin Source File - -SOURCE=.\source\main.h -# End Source File -# Begin Source File - -SOURCE=.\source\modmeth.cpp -# End Source File -# Begin Source File - -SOURCE=.\source\py.cpp -# End Source File -# Begin Source File - -SOURCE=.\source\pyargs.cpp -# End Source File -# Begin Source File - -SOURCE=.\source\pyext.cpp -# End Source File -# Begin Source File - -SOURCE=.\source\pyext.h -# End Source File -# Begin Source File - -SOURCE=.\source\register.cpp -# End Source File -# End Target -# End Project diff --git a/externals/grill/py/source/bound.cpp b/externals/grill/py/source/bound.cpp index c0e8c35a..debbf5dd 100644 --- a/externals/grill/py/source/bound.cpp +++ b/externals/grill/py/source/bound.cpp @@ -123,6 +123,9 @@ PyObject *pyext::pyext_unbind(PyObject *,PyObject *args) V pyext::ClearBinding() { + // in case the object couldn't be constructed... + if(!pyobj) return; + void *data = NULL; const t_symbol *sym = NULL; |