[wxpython-users] MIME Types, MS Word and DDE...
Sebastian Żurek
sebzur at gmail.com
Wed Apr 23 16:03:09 PDT 2008
Hi,
I've met a serious problem... I've got a very simple file manager in my
application. I need to open the files with command returned by the
GetOpenCommand method, namely:
def OpenFile(self,name,ext):
ft= wx.TheMimeTypesManager.GetFileTypeFromExtension(ext)
filename = name + "." + ext
mime = ft.GetMimeType() or ""
fullpath=os.path.join(self.path,filename)
cmd = ft.GetOpenCommand(fullpath, mime)
subprocess.Popen(cmd,shell=True)
But... There's a problem with WinWord - the command returned by
GetOpenCommand starts with WX_DDE and the WinWord uses a DDE to load a
file. This is a source of my problem. Will I have to use something like
win32com to handle this, or maybe there's some solution within wx.DDE*
classes? I'm quite a newbie to the 'dde' (in fact, that's my very first
time with it) and I'm not sure how to handle this... And does the
WX_DDE# prefix inform me, that I shoud use some 'dde techniques' to open
the file?
For now, I have overcome the problem and I parse the GetOpenCommand to
find the WindWord.exe path and I start it without dde - but I don't like
it very much...
Thanks for Your comments.
Sebastian
More information about the wxpython-users
mailing list