Skip to content

Instantly share code, notes, and snippets.

@firstspring1845
Last active August 29, 2015 14:27
Show Gist options
  • Save firstspring1845/8613d617f7bc2309c440 to your computer and use it in GitHub Desktop.
Save firstspring1845/8613d617f7bc2309c440 to your computer and use it in GitHub Desktop.
ddの進捗表示してくれるやつ
import time, subprocess
args = ['dd', 'if=/mnt/hd/2015-05-05-raspbian-wheezy.img', 'of=/dev/sdf', 'bs=1M']
p = subprocess.Popen(args)
time.sleep(0.1)
while p.poll() == None:
time.sleep(0.1)
p.send_signal(10) #SIGUSR1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment