osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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