micropi.py 文件源码

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

项目:Micro-Pi 作者: Bottersnike 项目源码 文件源码
def upload(self):
    global mbedUploading
    if os.path.exists('%s/build/bbc-microbit-classic-gcc/source/microbit-build-combined.hex' % buildLocation):
        if os.path.exists(SETTINGS['mbitLocation']):
            end = open('%s/build/bbc-microbit-classic-gcc/source/microbit-build-combined.hex' % buildLocation).read()
            open(
                '%s/microbit-build-combined.hex' % SETTINGS['mbitLocation'],
                'w'
            ).write(end)
        else:
            gobject.idle_add(self.message, """Cannot upload!
Micro:Bit not found!
Check it is plugged in and
Micro:Pi knows where to find it.""")
    else:
        gobject.idle_add(self.message, """No build files avaliable""")
    mbedUploading = False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号