OS env for Windows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • StvB

    #1

    OS env for Windows

    Hi, have wxHtmlWindow question here.

    On my OnLinkClicked handler, I do the following:
    ---------------

    def OnLinkClicked(s elf,linkinfo):
    f = wx.TheMimeTypes Manager.GetFile TypeFromExtensi on('.html')
    if not f:
    return

    try:
    cmd = wx.FileType.Get OpenCommand(f,l inkinfo.GetHref ())
    wx.Execute(cmd)
    except:
    wxMessageBox("S omething unexpected
    happened","MyAp p",wxOK|wxICON_ INFORMATION )

    ---------------

    If I'm on my Windows 2000 machine at work, when I attempt to execute the
    default browser action,
    with wx.Execute, I first get a freeze on my app ( with the About box
    showing, where I have the html
    window situated). And the browser is trying to open, but instead, after a
    long delay:

    "dde execute request failed: a request for a synchronous execute transaction
    has timed out"


    On my XP system at home, Firefox comes up fine, and very quickly.

    Main question:
    I tried to add an If condition, to test for the 'OS' env variable, but this
    won't work I realize,after
    noticing that *both* 2000 and XP have the value: WINDOWS_NT.

    Is there any other way
    of distinguishing between XP and 2000 I wonder?

    Steve


Working...