ExplorerURLScheme.py 文件源码

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

项目:explorer-integration 作者: Esri 项目源码 文件源码
def saveQRCodePNG(self, validURL, filename, imageDirectory=None):
        fullfilename = imageDirectory + filename if imageDirectory is not None else filename
        objectQRCode = pyqrcode.create(validURL)
        with open(fullfilename + ".png", 'wb') as fstream:
            objectQRCode.png(fstream, scale=5)
        # same as above
        objectQRCode.png(fullfilename + ".png", scale=5)
        # in-memory stream is also supported
        buffer = io.BytesIO()
        objectQRCode.png(buffer)
        # do whatever you want with buffer.getvalue()
        print(list(buffer.getvalue()))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号