A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2018-November/155694.html below:

[Python-Dev] SyntaxError: can't assign to literal while using ""blkid -o export %s | grep 'TYPE'

[Python-Dev] SyntaxError: can't assign to literal while using ""blkid -o export %s | grep 'TYPE' | cut -d"=" -f3" % (fs)" using subprocess module in Python [Python-Dev] SyntaxError: can't assign to literal while using ""blkid -o export %s | grep 'TYPE' | cut -d"=" -f3" % (fs)" using subprocess module in PythonSteven D'Aprano steve at pearwood.info
Tue Nov 6 17:25:51 EST 2018
This list is for the development *of* the Python interpreter, not 
support for *using* Python. If you signed up to this mailing list via 
the web, it clearly says:

    Do not post general Python questions to this list.

highlighted in a great big box in red. Was that not clear enough? What 
can we do to make that more clear?

You can try many other places for support, such as Stackoverflow, 
Reddit's /r/LearnPython, or the Python tutor mailing list:

https://mail.python.org/mailman/listinfo/tutor

but I expect most of them will tell you the same thing. You should try 
to give a *minimum* example of your problem, not your entire script. 
Start by reading here:

http://sscce.org/

As for your SyntaxError, the problem is line 99:

>   File "sd.py", line 99
> *    cmd = "blkid -o export %s | grep 'TYPE' | cut -d"=" -f3" % (fs)*
> *         ^*
> *SyntaxError: can't assign to literal*

The arrow ^ is pointing to the wrong equals sign, but simplifying the 
code and adding spaces makes it clear:

cmd = "spam" = "eggs"

gives the same error. Perhaps you mean == (equals) or perhaps the second 
assignment shouldn't be there at all?



-- 
Steve
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4