mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-17 07:28:14 +08:00
修改了Web后台的部分界面,增加了HAmqtt中的总电量传感器,后台新增mqtt上报频率设置
This commit is contained in:
46
mico-os/makefiles/scripts/image_size.py
Normal file
46
mico-os/makefiles/scripts/image_size.py
Normal file
@@ -0,0 +1,46 @@
|
||||
#! /usr/bin/env python
|
||||
# Copyright (C) 2015 Marvell International Ltd.
|
||||
# All Rights Reserved.
|
||||
|
||||
# Load application to ram helper script
|
||||
# Note: sys.stdout.flush() and sys.stderr.flush() are required for proper
|
||||
# console output in eclipse
|
||||
|
||||
import os, sys, getopt
|
||||
|
||||
def print_usage():
|
||||
print ""
|
||||
print "Usage:"
|
||||
print sys.argv[0]
|
||||
print " Usage: return size of the input file"
|
||||
sys.stdout.flush()
|
||||
|
||||
def main():
|
||||
|
||||
if not len(sys.argv)==2:
|
||||
print_usage()
|
||||
sys.exit(2)
|
||||
|
||||
IMAGE_FILE = sys.argv[1]
|
||||
|
||||
if not os.path.isfile(IMAGE_FILE):
|
||||
print "Input a iamge file!"
|
||||
sys.stdout.flush()
|
||||
sys.exit()
|
||||
|
||||
|
||||
if not os.path.exists(IMAGE_FILE):
|
||||
print "Input image file not exist!"
|
||||
sys.stdout.flush()
|
||||
sys.exit()
|
||||
|
||||
image_size = os.path.getsize(IMAGE_FILE)
|
||||
print image_size
|
||||
sys.stdout.flush()
|
||||
sys.exit(0)
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
main()
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
Reference in New Issue
Block a user