From f703a5fb3c5f0213a89758b30a6e9a64d39a6799 Mon Sep 17 00:00:00 2001 From: "gergely.erdelyi" Date: Tue, 27 Jan 2009 18:08:54 +0000 Subject: [PATCH] ScriptBox_instance renamed to scriptbox --- python.cpp | 2 +- python/init.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/python.cpp b/python.cpp index 3182f2d..3558ae6 100644 --- a/python.cpp +++ b/python.cpp @@ -221,7 +221,7 @@ void IDAPython_ScriptBox(void) module = PyImport_AddModule("__main__"); dict = PyModule_GetDict(module); - scriptbox = PyDict_GetItemString(dict, "ScriptBox_instance"); + scriptbox = PyDict_GetItemString(dict, "scriptbox"); if (!scriptbox) { diff --git a/python/init.py b/python/init.py index 5a9cb4f..722de0b 100644 --- a/python/init.py +++ b/python/init.py @@ -42,8 +42,8 @@ def addscriptpath(script): sys.path.append(scriptpath) # Add the script to ScriptBox if it's not there yet - if not script in ScriptBox_instance.list: - ScriptBox_instance.list.insert(0, script) + if not script in scriptbox.list: + scriptbox.list.insert(0, script) def runscript(script): @@ -138,7 +138,7 @@ class ScriptBox(Choose): def addscript(self, scriptpath): self.list.append(scriptpath) -ScriptBox_instance = ScriptBox() +scriptbox = ScriptBox() #------------------------------------------------------------- # Watchdog to catch runaway scripts after a specified timeout @@ -202,7 +202,6 @@ userrc = get_user_idadir() + os.sep + "idapythonrc.py" if os.path.exists(userrc): runscript(userrc) # Remove the user script from the history - del ScriptBox_instance.list[0] - + del scriptbox.list[0] # All done, ready to rock.