aboutsummaryrefslogtreecommitdiff
path: root/externals/grill/py/source/py.cpp
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2004-01-20 03:38:46 +0000
committerThomas Grill <xovo@users.sourceforge.net>2004-01-20 03:38:46 +0000
commit84afa8ecc7a7cd68f3477d2ea348c7ff4748a6aa (patch)
tree8f06c1e5c8f0b284199e75fa21fd832bff1f221f /externals/grill/py/source/py.cpp
parent74ef922d448f89f24049517eae3ad94764dfc8eb (diff)
""
svn path=/trunk/; revision=1270
Diffstat (limited to 'externals/grill/py/source/py.cpp')
-rw-r--r--externals/grill/py/source/py.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/externals/grill/py/source/py.cpp b/externals/grill/py/source/py.cpp
index 85fb0d75..bfc32678 100644
--- a/externals/grill/py/source/py.cpp
+++ b/externals/grill/py/source/py.cpp
@@ -111,15 +111,16 @@ pyobj::pyobj(I argc,const t_atom *argv):
// init script module
if(argc >= 1) {
- C dir[1024];
- GetModulePath(GetString(argv[0]),dir,sizeof(dir));
- // set script path
- AddToPath(dir);
-
if(!IsString(argv[0]))
post("%s - script name argument is invalid",thisName());
- else
+ else {
+ C dir[1024];
+ GetModulePath(GetString(argv[0]),dir,sizeof(dir));
+ // set script path
+ AddToPath(dir);
+
ImportModule(GetString(argv[0]));
+ }
}
Register("_py");
@@ -208,7 +209,7 @@ V pyobj::m_set(I argc,const t_atom *argv)
V pyobj::m_help()
{
post("");
- post("py %s - python script object, (C)2002-2004 Thomas Grill",PY__VERSION);
+ post("%s %s - python script object, (C)2002-2004 Thomas Grill",thisName(),PY__VERSION);
#ifdef FLEXT_DEBUG
post("DEBUG VERSION, compiled on " __DATE__ " " __TIME__);
#endif