davemds pushed a commit to branch master.
commit 9d167fdf6686a8a51a334f5576800077e735d224
Author: davemds <[email protected]>
Date: Tue Apr 23 22:35:52 2013 +0200
PythonEFL: my py2.7 dont like the exec() inside a lambda.
---
examples/elementary/test.py | 5 ++++-
examples/elementary/test_config.py | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/examples/elementary/test.py b/examples/elementary/test.py
index f116252..380f3e0 100755
--- a/examples/elementary/test.py
+++ b/examples/elementary/test.py
@@ -174,6 +174,9 @@ items = [
]
+def selected_cb(o, mod, func):
+ exec("from " +mod + " import " + func + "\n" + func + "(o)")
+
def menu_create(search, win):
tbx.clear()
for category in items:
@@ -196,7 +199,7 @@ def menu_create(search, win):
if (search == None) or (test[0].lower().find(search.lower()) > -1):
bt = Button(win)
bt.text = test[0]
- bt.callback_clicked_add(lambda o, y = test[1], z = test[2]:
exec("from " + y + " import " + z + "\n" + z + "(o)"))
+ bt.callback_clicked_add(selected_cb, test[1], test[2])
bt.show()
tbx2.pack_end(bt)
cnt += 1
diff --git a/examples/elementary/test_config.py
b/examples/elementary/test_config.py
index bb58d07..dc48078 100644
--- a/examples/elementary/test_config.py
+++ b/examples/elementary/test_config.py
@@ -5,6 +5,7 @@ from efl import elementary
from efl.elementary.window import StandardWindow, Window,
ELM_WIN_INLINED_IMAGE, \
ELM_WIN_SOCKET_IMAGE
from efl.elementary.button import Button
+from efl.elementary.background import Background
from efl.elementary.label import Label
from efl.elementary.radio import Radio
from efl.elementary.check import Check
--
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr