Added __builtns__ extender logc
This commit is contained in:
parent
f96974d79e
commit
9126d0a5ec
|
@ -0,0 +1,6 @@
|
||||||
|
class Builtins:
|
||||||
|
def hello_world():
|
||||||
|
print("Hello, world!")
|
||||||
|
|
||||||
|
|
||||||
|
__builtins__.update({"hello_world": hello_world})
|
|
@ -8,9 +8,10 @@ import inspect
|
||||||
# Application imports
|
# Application imports
|
||||||
from utils import Settings
|
from utils import Settings
|
||||||
from signal_classes import Signals
|
from signal_classes import Signals
|
||||||
|
from __builtins__ import Builtins
|
||||||
|
|
||||||
|
|
||||||
class Main:
|
class Main(Builtins):
|
||||||
def __init__(self, args):
|
def __init__(self, args):
|
||||||
settings = Settings()
|
settings = Settings()
|
||||||
builder = settings.returnBuilder()
|
builder = settings.returnBuilder()
|
||||||
|
|
|
@ -19,6 +19,8 @@ class Signals(DummyMixin):
|
||||||
self.settings = settings
|
self.settings = settings
|
||||||
self.builder = self.settings.returnBuilder()
|
self.builder = self.settings.returnBuilder()
|
||||||
|
|
||||||
|
hello_world() # A global method from the __builtins__ file that added it
|
||||||
|
|
||||||
|
|
||||||
def getClipboardData(self):
|
def getClipboardData(self):
|
||||||
proc = subprocess.Popen(['xclip','-selection', 'clipboard', '-o'], stdout=subprocess.PIPE)
|
proc = subprocess.Popen(['xclip','-selection', 'clipboard', '-o'], stdout=subprocess.PIPE)
|
||||||
|
|
Loading…
Reference in New Issue