How to return from shutdown command

Craig Findlay craigf at ilid.com.au
Thu Feb 8 23:01:54 EST 2001


I want to execute a Unix shutdown command from a python script, but
have control return to the script, and I'm having trouble doing it.

I've tried:

commands.getstatusoutput('shutdown -h +1')
and
commands.getstatusoutput('/bin/sh -c "shutdown -h +1" \&')

but neither of these commands return.

Any help greatly appreciated!

Craig




More information about the Python-list mailing list