[wxPython-users] Re: How to open an explorer window?

Robert Dailey rcdailey at gmail.com
Wed Aug 1 10:21:12 PDT 2007


Hi,

First of all I don't mean to sound unappreciative, I apologize if I have
offended. Secondly by "unclean" I mean that you're passing in an arbitrary
string that must be parsed; whereas all of the data components in the string
can be split up to represent objects and/or methods. For example,
wx.FileDialog is an interface that has members functions that do various
tasks. Creating a explorer window using that string is like creating a
wx.FileDialog by doing: wx.MakeDlg( "-title 'Open a file' -extensions
'*.txt,*.cpp' -button 'ok' -button 'cancel'" ). My basic point is that I was
expecting a more object oriented way of opening an explorer window, much
like wx.FileDialog in comparison.

wxWidgets is supposed to be platform independent, which makes this task
difficult. I'm not an expert in any other operating system but Windows, but
the way file explorer is interfaced through windows just seems like a very
platform specific thing to me (other operating systems might do it
completely differently I imagine). Secondly, your suggestion gets the job
done in one line of code, so no point in complaining. It was my fault for
not phrasing my previous comment correctly, I meant to say that it's
actually clean in terms of code size, and by "unclean" I meant it's not
object oriented.

I hope I've cleared up any miscommunication. Thanks again for the wonderful
solutions.

On 8/1/07, Grant Edwards <grante at visi.com> wrote:
>
> On 2007-08-01, Robert Dailey <rcdailey at gmail.com> wrote:
>
> > The suggestions here so far I like better than nothing,
>
> I'm curious: what exactly do you think is wrong with it?
>
>   subprocess.Popen('explorer /select,c:\\path\\to\\file.py')
>
> It does exactly what you asked with a single line of code, yet
> you're dissatisfied.
>
> > at least the code is somewhat clean.
>
> What's unclean about it?
>
> --
> Grant Edwards                   grante             Yow! I hope I bought
> the
>                                   at               right relish ...
> zzzzzzzzz
>                                visi.com            ...
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200708=
01/114bbbf5/attachment.htm


More information about the wxpython-users mailing list