--- a/wxglade_hmi/wxglade_hmi.py Thu Jun 13 09:37:43 2013 +0200
+++ b/wxglade_hmi/wxglade_hmi.py Thu Jun 13 09:42:59 2013 +0200
@@ -71,12 +71,16 @@
define_hmi = hmipyfile.read().decode('utf-8')
declare_hmi = "\n".join(["%(name)s = None\n" % x +
"\n".join(["%(class)s.%(h)s = %(h)s"%
dict(x,h=h) for h in x['handlers']])
- global_hmi = "global %s\n"%",".join(
- [x["name"] for x in hmi_frames])
+ global_hmi = ("global %s\n"%",".join( + [x["name"] for x in hmi_frames]) + if len(hmi_frames) > 0 else "") init_hmi = "\n".join(["""\
wx.MessageBox(_("Please stop PLC to close"))