rename evalPy to py

This commit is contained in:
Michael Davidsaver
2013-04-14 12:04:47 -04:00
parent 1e34cf9b76
commit 47c47dfa6e
2 changed files with 11 additions and 11 deletions

View File

@ -61,7 +61,7 @@ static pystate statenames[] = {
}; };
#undef INITST #undef INITST
void evalPy(const char* code) void py(const char* code)
{ {
PyGILState_STATE state; PyGILState_STATE state;
@ -73,7 +73,7 @@ void evalPy(const char* code)
PyGILState_Release(state); PyGILState_Release(state);
} }
void evalFilePy(const char* file) void pyfile(const char* file)
{ {
FILE *fp; FILE *fp;
PyGILState_STATE state; PyGILState_STATE state;
@ -226,11 +226,11 @@ static const iocshArg argFile = {"file", iocshArgString};
static const iocshArg* const codeArgs[] = {&argCode}; static const iocshArg* const codeArgs[] = {&argCode};
static const iocshArg* const fileArgs[] = {&argFile}; static const iocshArg* const fileArgs[] = {&argFile};
static const iocshFuncDef codeDef = {"evalPy", 1, codeArgs}; static const iocshFuncDef codeDef = {"py", 1, codeArgs};
static const iocshFuncDef fileDef = {"evalFilePy", 1, fileArgs}; static const iocshFuncDef fileDef = {"pyfile", 1, fileArgs};
static void codeRun(const iocshArgBuf *args){evalPy(args[0].sval);} static void codeRun(const iocshArgBuf *args){py(args[0].sval);}
static void fileRun(const iocshArgBuf *args){evalFilePy(args[0].sval);} static void fileRun(const iocshArgBuf *args){pyfile(args[0].sval);}
static void pySetupReg(void) static void pySetupReg(void)
{ {

View File

@ -5,12 +5,12 @@ epicsEnvSet("PYTHONPATH", "${PWD}/python:${PWD}/testApp")
dbLoadDatabase("dbd/devsup.dbd") dbLoadDatabase("dbd/devsup.dbd")
devsup_registerRecordDeviceDriver(pdbbase) devsup_registerRecordDeviceDriver(pdbbase)
#evalPy "import devsup.hooks" #py "import devsup.hooks"
#evalPy "devsup.hooks.debugHooks()" #py "devsup.hooks.debugHooks()"
evalPy "import test2" py "import test2"
evalPy "test2.addDrv('AAAA')" py "test2.addDrv('AAAA')"
evalPy "test2.addDrv('BBBB')" py "test2.addDrv('BBBB')"
dbLoadRecords("db/test.db","P=md:") dbLoadRecords("db/test.db","P=md:")