+ # Parse "pragma" comments if enabled
+ if node.data and node.data[0] == '%' and g.conf.allowExec != 'no' and \
+ xxxParamComment.allow is not False:
+ # Show warning
+ if g.conf.allowExec == 'ask' and xxxParamComment.allow is None:
+ flags = wx.ICON_EXCLAMATION | wx.YES_NO | wx.CENTRE
+ dlg = wx.MessageDialog(g.frame, '''
+This file contains executable %comment directives. Allow to execute?''',
+ 'Warning', flags)
+ say = dlg.ShowModal()
+ dlg.Destroy()
+ if say == wx.ID_YES:
+ xxxParamComment.allow = True
+ else:
+ xxxParamComment.allow = False