Subprocess quote problem

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sat Aug 19 08:36:59 EDT 2006


In message <mailman.9504.1155898468.27775.python-list at python.org>, Adriano
Monteiro wrote:

> "Failed to open input file "/home/adriano/umit/test/targets" for reading
> QUITTING!"

Which is not the same as saying:

  "Failed to open input file /home/adriano/umit/test/targets for reading
  QUITTING!"

Spot the difference?

> command = ['nmap', '-T', 'Aggressive', '-n', '-F', '-iL',
> '"/home/adriano/umit/test/targets"']

Why exactly where you putting quotes within quotes in the path? That kind of
thing is only necessary when typing things on the shell command line, to
prevent the shell itself misinterpreting things, like putting word breaks
in the wrong places or having wrong behaviours triggered by special
characters.



More information about the Python-list mailing list