helper.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:mappyfile 作者: geographika 项目源码 文件源码
def _create_image_from_map(map_file, out_img, format):

    out_img += ".%s" % format
    #print out_img
    params = ["shp2img", "-m", map_file, "-i", format, "-o", out_img]

    os.environ['PATH'] = DLL_LOCATION + ';' + os.environ['PATH']

    p = Popen(params, stdout=PIPE, bufsize=1)
    with p.stdout:
        for line in iter(p.stdout.readline, b''):
            print(line)

    p.wait() # wait for the subprocess to exit

    #os.startfile(out_img)
    return out_img
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号