From 586ea10071d04ce25f1b3ed13fea2cd83b95d581 Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 25 Jul 2013 01:17:45 +0100 Subject: [PATCH] Added prof_on_start function to hello world plugin --- helloworld.py | 7 +++++++ src/api/api.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 helloworld.py diff --git a/helloworld.py b/helloworld.py new file mode 100644 index 00000000..8e7e4d39 --- /dev/null +++ b/helloworld.py @@ -0,0 +1,7 @@ +import prof + +def prof_on_start(): + helloworld() + +def helloworld(): + prof.cons_show("Hello world!") diff --git a/src/api/api.c b/src/api/api.c index 50893a61..c83aef1f 100644 --- a/src/api/api.c +++ b/src/api/api.c @@ -55,7 +55,7 @@ api_init(void) if (pModule != NULL) { - pFunc = PyObject_GetAttrString(pModule, "helloworld"); + pFunc = PyObject_GetAttrString(pModule, "prof_on_start"); if (pFunc == NULL) { cons_show("NULL pfunc");