difficulty executing specific commands in python when not connected to network on a linux system

view story

http://stackoverflow.com – I'm puzzled by this one. If I'm connected to the network on a linux system everything works fine. If disconnected I'm having trouble executing either of these sets of commands: set #1: cmd = 'cat /sys/class/rtc/rtc0/wakealarm' args = shlex.split(cmd) curr_alarm_sse,error = subprocess.Popen(args,stdout = subprocess.PIPE, stderr= subprocess.PIPE).communicate() set #2: curr_alarm_sse = commands.getoutput("cat /sys/class/rtc/rtc0/wakealarm") It isn't the cat command either, I tried to do a simple ls of my home directory, and in all cases the python script just locks up until I connect to (HowTos)