summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2018-10-31 13:44:04 -0400
committerJordan Wiens <jordan@psifertex.com>2018-11-26 22:46:06 -0500
commitd0fc9bbf30b0813e4f287035a207b6e40853f7c7 (patch)
treeb1fdbd973a41d1e9cb95a6334dda09675a5ed8e0 /python
parent8cf3719a8289bcf880d921d36447894e8e2b0664 (diff)
Convert core globals to functions.
Diffstat (limited to 'python')
-rw-r--r--python/__init__.py47
1 files changed, 29 insertions, 18 deletions
diff --git a/python/__init__.py b/python/__init__.py
index d2140f23..9ee8f158 100644
--- a/python/__init__.py
+++ b/python/__init__.py
@@ -229,29 +229,40 @@ def _init_plugins():
_destruct_callbacks = _DestructionCallbackHandler()
-bundled_plugin_path = core.BNGetBundledPluginDirectory()
-user_plugin_path = core.BNGetUserPluginDirectory()
+def bundled_plugin_path():
+ return core.BNGetBundledPluginDirectory()
-core_version = core.BNGetVersionString()
-'''Core version'''
+def user_plugin_path():
+ return core.BNGetUserPluginDirectory()
-core_build_id = core.BNGetBuildId()
-'''Build ID'''
+def core_version():
+ '''Core version'''
+ return core.BNGetVersionString()
-core_serial = core.BNGetSerialNumber()
-'''Serial Number'''
+def core_build_id():
+ '''Build ID'''
+ core.BNGetBuildId()
-core_expires = gmtime(core.BNGetLicenseExpirationTime())
-'''License Expiration'''
+def core_serial():
+ '''Serial Number'''
+ return core.BNGetSerialNumber()
-core_product = core.BNGetProduct()
-'''Product string from the license file'''
+def core_expires():
+ '''License Expiration'''
+ return gmtime(core.BNGetLicenseExpirationTime())
-core_product_type = core.BNGetProductType()
-'''Product type from the license file'''
+def core_product():
+ '''Product string from the license file'''
+ return core.BNGetProduct()
-core_license_count = core.BNGetLicenseCount()
-'''License count from the license file'''
+def core_product_type():
+ '''Product type from the license file'''
+ return core.BNGetProductType()
-core_ui_enabled = core.BNIsUIEnabled()
-'''Indicates that a UI exists and the UI has invoked BNInitUI'''
+def core_license_count():
+ '''License count from the license file'''
+ return core.BNGetLicenseCount()
+
+def core_ui_enabled():
+ '''Indicates that a UI exists and the UI has invoked BNInitUI'''
+ return core.BNIsUIEnabled()