[Tutor] SyntaxError: can't assign to literal while using ""blkid -o export %s | grep 'TYPE' | cut -d"=" -f3" % (fs)" using subprocess module in Python

Chris Angelico rosuav at gmail.com
Fri Nov 9 07:23:11 EST 2018


On Fri, Nov 9, 2018 at 11:11 PM Anssi Saari <as at sci.fi> wrote:
>
> Chris Angelico <rosuav at gmail.com> writes:
>
> > No helper needed. Safe against command injection. Uses the known
> > format of the command's output; if you want other information as well
> > as the type, you could get that too.
>
> Can someone let me in on this secret helper module? Doesn't seem to
> match the helper module in PyPI at least.
>

What helper? I said you don't need one. Just use subprocess directly.

ChrisA



More information about the Python-list mailing list