On 2016-10-27 00:57, Wolfgang Maier wrote:

The structure of the command you are trying to execute would require
you to set the "shell" argument of subprocess.call to True.
Specifically, the "<" redirection operator is shell functionality.

Thank you Wolfgang. Simply eliminating the call to shlex.split() made everything work as desired.

.........


as long as you promise to NEVER use that code in production with user
input. The problem with it is that it may allow users to inject shell
commands as they like exactly because whatever ends up in the command
string gets interpreted by the shell.

I promise!

Thanks again.
Alex


_____________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to