Open main menu

CDOT Wiki β

Changes

OPS435 Python Lab 3

2 bytes added, 18:26, 3 June 2017
PART 2 - Running System Commands with Subprocess
:::*The script should have a '''Shebang line'''
:::*The script should '''import subprocess'''
:::*The script should use the linux command: '''<nowiki>"df -h | grep '/$' | awk '{print $4}'"</nowiki>'''
:::*The script should contain the function called: '''free_space()'''
:::*The function '''free_space()''' should return a string which is in '''utf-8''' and has '''newline characters strip'''
13,420
edits