Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

        def has_ghostscript():
    if gs_windows_binary:
        return True
    if not sys.platform.startswith('win'):
        import subprocess
        try:
            gs = subprocess.Popen(['gs','--version'], stdout=subprocess.PIPE)
            gs.stdout.read()
            return True
        except OSError:
            # no ghostscript
            pass
    return False
        


src/p/i/Pillow-HEAD/Tests/test_imagefile.py   Pillow(Download)
    assert_image_equal(*roundtrip("PCX"))
 
    if EpsImagePlugin.has_ghostscript():
        im1, im2 = roundtrip("EPS")
        assert_image_similar(im1, im2.convert('L'),20) # EPS comes back in RGB      

src/p/i/Pillow-HEAD/Tests/test_file_eps.py   Pillow(Download)
import io
 
if not EpsImagePlugin.has_ghostscript():
    skip()