Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This is what happens:
- Traceback (most recent call last):
- File "/home/dewaard/Python/Antiqbook/executiontest.py", line 8, in ?
- print >>f, "foobar"
- IOError: [Errno 9] Bad file descriptor
- This is my code:
- import os
- import sys
- command = ("ftpasswd --passwd --file=%s --name=%s --uid=%d --home=%s --shell=%s --gid=%d" %
- ("/etc/proftpd/passwd", "foo", 5001, "/ftp/aar", "/bin/false", 5000))
- f = os.popen(command)
- print >>f, "foobar"
- f.close()
Add Comment
Please, Sign In to add comment