/usr/lib/python2.7/dist-packages/hachoir_wx/field_view/field_menu.py is in python-hachoir-wx 0.3-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # -*- coding: utf-8 -*-
from hachoir_wx.dialogs import file_save_dialog
import wx
class field_menu_t:
def __init__(self, parent, menu):
self.parent = parent
self.menu = menu
# forward this call because xrc doesn't allow menu
# subclassing (as of 2.6.3)
self.Bind = self.menu.Bind
def show_opts(self):
self.parent.PopupMenu(self.menu)
def ask_for_dump_file(self, title):
dump_dlog = file_save_dialog(title)
if wx.ID_OK == dump_dlog.ShowModal():
return dump_dlog.GetPath()
|