Created
June 26, 2012 08:29
-
-
Save changtimwu/2994386 to your computer and use it in GitHub Desktop.
python script to send bunch of uboot envs to uart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os,sys | |
import time | |
f=open( sys.argv[1]) | |
for line in f: | |
line = line.strip(' \r\n') | |
args=line.split('=') | |
key = args[0] | |
val= '='.join(args[1:]) | |
if len(args)>1: | |
sline = "setenv {0} '{1}'".format( key, val) | |
print sline | |
time.sleep(0.09) | |
f.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment