Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/pynxc/waxy/core.py
blob: 0b58a485fa5ee4b7240240d2c42f6d21665ecd2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
DEBUG = 0   # set to 1 to enable debugging messages

from wx import BeginBusyCursor, CallAfter, EndBusyCursor, GetActiveWindow, \
                GetApp, Platform, SafeYield, WakeUpIdle, Yield, YieldIfNeeded



if False:
    required = (2, 8, 0, 0) # minimum wxPython version
    required_str = ".".join(map(str, required))
    
    # if a multiversion wxPython is installed, attempt to get a required version
    try:
        # for wxversion, we only take the first two numbers
        import wxversion
        wxversion_req = ".".join(map(str, required[:2]))
        try:
            wxversion.ensureMinimal(wxversion_req)
        except wxversion.VersionError, e:
            # it should also be possible to import wax after wxPython is imported.
            # this VersionError prevents this, so we work around it.
            if e.args[0].find("must be called before wxPython is imported") < 0:
                raise
    except ImportError: # will fail if it's not a multiversion installation
        pass
    
    import wx
    
    assert wx.VERSION >= required, \
           "This version of Wax requires wxPython %s or later" % (required_str,)
    
    DEBUG = 0   # set to 1 to enable debugging messages
    
    from wx import BeginBusyCursor, CallAfter, EndBusyCursor, GetActiveWindow, \
                   GetApp, Platform, SafeYield, WakeUpIdle, Yield, YieldIfNeeded