Not enough arguments for format string

Kevin Walzer sw at
Mon Nov 14 18:06:25 CET 2005

I'm getting an error in a Python script I'm writing: "not enough 
arguments for format string." The error comes at the end of the 
os.system command, referenced below. Any ideas?


import EasyDialogs
import os
import sys

password = EasyDialogs.AskPassword("To launch Ethereal, please enter 
your password:")
binpath = os.path.join(os.path.dirname(sys.argv[0]), 
os.system('open -a; cd ~/; printenv; DISPLAY=:0.0; export 
DISPLAY;  echo %s | sudo -S %s; sudo -k' %password %binpath)

TypeError: not enough arguments for format string


Kevin Walzer, PhD
WordTech Software - "Tame the Terminal"
sw at

More information about the Python-list mailing list