示例#1
0
    def makeImages(self):
        """ create images """

        done = 0
        for cl in self.parent.claims:
            for attack in cl.attacks:
                Makeimage.makeImage(attack,self)
                done += 1
                if self.callbackattack:
                    wx.CallAfter(self.callbackattack,attack,self.totalattacks,done)
            if self.callbackclaim:
                wx.CallAfter(self.callbackclaim,cl)
        if self.callbackdone:
            wx.CallAfter(self.callbackdone)
示例#2
0
def testPIL():
    """
    Test whether PIL works as we want it.

    We generate a postscript file from a dot file, and see what happens.
    """

    # depends on PIL lib
    okay = True
    try:
        Makeimage.testImage()
        # PIL seems fine
    except:
        # PIL broke
        doNotUsePIL()
        okay = False

    return okay
示例#3
0
def testPIL():
    """
    Test whether PIL works as we want it.

    We generate a postscript file from a dot file, and see what happens.
    """

    # depends on PIL lib
    okay = True
    try:
        Makeimage.testImage()
        # PIL seems fine
    except:
        # PIL broke
        doNotUsePIL()
        okay = False

    return okay