I am having trouble with Python and would like to have some help.
I am making a apt GUI 'front-end' with a nice UI.
def on_textbox_changed(self): self.instvar = self.installapps.get_text() def on_button1_clicked(self, widget): print "Preparing to run 'sudo apt-get install (package selected)" command2 = 'xterm -e sudo apt-get install ' and self.instvar cmd2 = commands.getoutput(command2)
Would you know how to take a textbox entry and make it a variable? I looked around the web and this is what I came up with. And every time I'm trying this it gives me this error:
Traceback (most recent call last): File "/home/rareshn/Documents/Zintori/Applets/aptfe/aptfe/AptfeWindow.py", line 49, in on_button1_clicked command2 = 'xterm -e sudo apt-get install ' and self.instvar AttributeError: 'AptfeWindow' object has no attribute 'instvar'
If you could help me, that would be useful. Thanks!