Didier C wrote:
> E.g in Perl, we can do something like:
>
> $dir="/home/cypher";
>
> system("ls $dir");
>
> Is there a way to reproduce the same thing in Python?
system("ls %s" % dir)
But you should really be using subprocess for security (so that if
dir=="/home/foo; rm -rf /" nothing bad will happen):
import subprocess
subprocess.Popen(['ls', dir])
--
http://mail.python.org/mailman/listinfo/python-list
