Added wxMimeTypesManager and wxFileType
Other updates...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12208
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+import pprint, string, os
from wxPython.wx import *
from mimetypes_wdr import *
from wxPython.wx import *
from mimetypes_wdr import *
EVT_LISTBOX(self, ID_LISTBOX, self.OnListbox)
EVT_BUTTON(self, ID_LOOKUP_BTN, self.OnLookup)
EVT_LISTBOX(self, ID_LISTBOX, self.OnListbox)
EVT_BUTTON(self, ID_LOOKUP_BTN, self.OnLookup)
- self.GetInputText().SetValue("html")
+ self.GetInputText().SetValue("wav")
self.OnLookup()
mimetypes = wxTheMimeTypesManager.EnumAllFileTypes()
self.OnLookup()
mimetypes = wxTheMimeTypesManager.EnumAllFileTypes()
self.GetExtensionsTxt().SetValue(str(ft.GetExtensions()))
self.GetDescriptionTxt().SetValue(str(ft.GetDescription()))
self.GetExtensionsTxt().SetValue(str(ft.GetExtensions()))
self.GetDescriptionTxt().SetValue(str(ft.GetDescription()))
- ext = ft.GetExtensions()[0]
+ filename = os.path.join("SPAM", ft.GetExtensions()[0])
mime = ft.GetMimeType() or ""
mime = ft.GetMimeType() or ""
- cmd = ft.GetOpenCommand("SPAM" + ext, mime)
+ cmd = ft.GetOpenCommand(filename, mime)
self.GetOpenCmdTxt().SetValue(str(cmd))
self.GetOpenCmdTxt().SetValue(str(cmd))
- cmd = ft.GetPrintCommand("SPAM" + ext, mime)
+ cmd = ft.GetPrintCommand(filename, mime)
self.GetPrintCmdTxt().SetValue(str(cmd))
self.GetPrintCmdTxt().SetValue(str(cmd))
- all = ft.GetAllCommands("SPAM" + ext, mime)
+ all = ft.GetAllCommands(filename, mime)
if all is None:
self.GetAllCmdsTxt().SetValue("")
else:
if all is None:
self.GetAllCmdsTxt().SetValue("")
else: