From 22eaba4518f85902489a35dbac0fd97654b59d43 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Thu, 23 Mar 2006 01:42:05 +0000 Subject: added message bundle functionality (pyext.Bundle class) enable compiled-only scripts (without .py) small optimizations and fixes some optimizations and py reload fix better error message for reload with invalid args enable module packages (module/__init__.py[co]), now also for Max svn path=/trunk/; revision=4750 --- externals/grill/py/source/py.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'externals/grill/py/source/py.cpp') diff --git a/externals/grill/py/source/py.cpp b/externals/grill/py/source/py.cpp index 3ef823a0..c773ffcb 100644 --- a/externals/grill/py/source/py.cpp +++ b/externals/grill/py/source/py.cpp @@ -156,12 +156,8 @@ pyobj::pyobj(int argc,const t_atom *argv) *pt = 0; } - if(*modnm) { - char dir[1024]; - GetModulePath(modnm,dir,sizeof(dir)); - AddToPath(dir); + if(*modnm) ImportModule(modnm); - } else ImportModule(NULL); } @@ -219,7 +215,8 @@ void pyobj::m_set(int argc,const t_atom *argv) ++argv,--argc; if(sn) { - if(!module || !strcmp(sn,PyModule_GetName(module))) { +// if(!module || !strcmp(sn,PyModule_GetName(module))) + { ImportModule(sn); Register(GetRegistry(REGNAME)); } @@ -244,7 +241,7 @@ void pyobj::m_set(int argc,const t_atom *argv) void pyobj::m_help() { post(""); - post("%s %s - python script object, (C)2002-2005 Thomas Grill",thisName(),PY__VERSION); + post("%s %s - python script object, (C)2002-2006 Thomas Grill",thisName(),PY__VERSION); #ifdef FLEXT_DEBUG post("DEBUG VERSION, compiled on " __DATE__ " " __TIME__); #endif -- cgit v1.2.1