On Wed, Nov 7, 2018 at 5:11 AM srinivasan <srinivasan....@gmail.com> wrote: > As am newbie to python development, I am trying to use the below function to > get verify the filesystem type of the SD card parition using bash command in > python using subprocess module, I ma seeing the below Error "SyntaxError: > can't assign to literal" >
This is more appropriate for python-list than for python-dev, which is about the development OF Python. But your problem here is quite simple: > cmd = "blkid -o export %s | grep 'TYPE' | cut -d"=" -f3" % (fs) You're trying to use the same quotation mark inside the string and outside it. That's not going to work. Try removing your inner quotes. You may also want to consider using Python to do your searching and cutting, rather than a shell pipeline. For more information on that, ask on python-list; people will be very happy to help out. ChrisA _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com