On Mon, Nov 12, 2018 at 11:20 PM Anssi Saari wrote:
>
> Chris Angelico writes:
>
> > On Fri, Nov 9, 2018 at 11:11 PM Anssi Saari wrote:
> >>
> >> Chris Angelico writes:
> >>
> >> > No helper needed. Safe against command injection. Uses the known
> >> > format of the command's output; if you
Chris Angelico writes:
> On Fri, Nov 9, 2018 at 11:11 PM Anssi Saari wrote:
>>
>> Chris Angelico 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.
srinivasan wrote:
> Even after changing as per the below
> "blkid -o export %s | grep 'TYPE' | cut -d'=' -f3"
> or:
> 'blkid -o export %s | grep "TYPE" | cut -d"=" -f3'
> or:
> "blkid -o export %s | grep \"TYPE\" | cut -d\"=\" -f3"
>
> Still my output is:
> */dev/mmcblk1p1: LABEL="efi"
On Fri, Nov 9, 2018 at 11:11 PM Anssi Saari wrote:
>
> Chris Angelico 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
Chris Angelico 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
Many Thanks a lot , I can use for reliably "lsblk %s -n -o FSTYPE" in the
reused code of mine as below
cmd = "lsblk %s -n -o FSTYPE" % partition_path
return self._helper.execute_cmd_output_string(cmd)
I really appreciate for all your support w.r.t this..
I feel I have kick
srinivasan writes:
> Even after changing as per the below
> "blkid -o export %s | grep 'TYPE' | cut -d'=' -f3"
> or:
> 'blkid -o export %s | grep "TYPE" | cut -d"=" -f3'
> or:
> "blkid -o export %s | grep \"TYPE\" | cut -d\"=\" -f3"
>
> Still my output is:
> */dev/mmcblk1p1: LABEL="efi"
On Wed, Nov 7, 2018 at 11:42 PM srinivasan wrote:
>
> Some I managed to fix temporarily as below, might be useful for others. Also
> please correct me if anything wrong or for any improvements in the below
>
> cmd = "blkid -o export %s" % partition_path
> out =
Some I managed to fix temporarily as below, might be useful for others.
Also please correct me if anything wrong or for any improvements in the
below
cmd = "blkid -o export %s" % partition_path
out = self._helper.execute_cmd_output_string(cmd)
var = out.split("TYPE=",
On Wed, Nov 7, 2018 at 11:36 PM Qian Cai wrote:
>
> srinivasan wrote:
> > Even after changing as per the below
> > "blkid -o export %s | grep 'TYPE' | cut -d'=' -f3"
> > or:
> > 'blkid -o export %s | grep "TYPE" | cut -d"=" -f3'
> > or:
> > "blkid -o export %s | grep \"TYPE\" | cut -d\"=\" -f3"
srinivasan wrote:
> Even after changing as per the below
> "blkid -o export %s | grep 'TYPE' | cut -d'=' -f3"
> or:
> 'blkid -o export %s | grep "TYPE" | cut -d"=" -f3'
> or:
> "blkid -o export %s | grep \"TYPE\" | cut -d\"=\" -f3"
>
> Still my output is:
> */dev/mmcblk1p1: LABEL="efi"
Even after changing as per the below
"blkid -o export %s | grep 'TYPE' | cut -d'=' -f3"
or:
'blkid -o export %s | grep "TYPE" | cut -d"=" -f3'
or:
"blkid -o export %s | grep \"TYPE\" | cut -d\"=\" -f3"
Still my output is:
*/dev/mmcblk1p1: LABEL="efi" UUID="1084-AA42" TYPE="vfat"*
My expected
On Wed, 2018-11-07 at 10:22 +0100, srinivasan wrote:
> blkid -o export %s | grep \'TYPE\' | cut -d\"=\" -f3
You don't need to escape the single quotes.
Try either:
"blkid -o export %s | grep 'TYPE' | cut -d'=' -f3"
or:
'blkid -o export %s | grep "TYPE" | cut -d"=" -f3'
or:
"blkid -o export %s |
After changing the line to *"cmd = "blkid -o export %s | grep \'TYPE\' |
cut -d\"=\" -f3" % fs"*, Now I dont see the error "SyntaxError: can't
assign to literal"
This is not returning exactly "*vfat*" instead of this, it is returning as "*
On 06/11/2018 18:10, srinivasan wrote:
root:~/qa/test_library# python3 sd.py
File "sd.py", line 99
*cmd = "blkid -o export %s | grep 'TYPE' | cut -d"=" -f3" % (fs)*
* ^*
*SyntaxError: can't assign to literal*
Look at the 'cut' element of the p
Dear Python Experts Team,
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&qu
On 17:06, venerdì 13 giugno 2008 Dennis Lee Bieber wrote:
-=-=-=-=-=-=- (make sure you have a fixed width client)
Very good indeed :) Specially to do with block reformatting.
I just post my script to demonstrate my thoughts in what I meant as
justifying. Specially considering that I meant
On 15:11, giovedì 12 giugno 2008 Dennis Lee Bieber wrote:
Word spaced line justification is only feasible if one is using a
fixed width font and have a line length defined in characters/line.
===8==8==8==8==8==8==8==8==8==8
line= 'fixed width font and have
On 14:49, giovedì 12 giugno 2008 Chris wrote:
You should strip all extraneous white space from code though.
For my taste, trailing spaces will be removed by my editor (Kate :) )
Other space tabulators are an issue which won't suite my needs.
--
Mailsweeper Home :
On 01:37, giovedì 12 giugno 2008 Ethan Furman wrote:
Do you mean indenting, or wrapping?
I mean fill the line by increasing spaces between words in order to get a
paragraph aligned both side, left and right on the page.
So if the width is 78 chars it wouldn't have jig saw end to the right side,
On Jun 12, 8:03 am, TheSaint [EMAIL PROTECTED] wrote:
On 01:37, giovedì 12 giugno 2008 Ethan Furman wrote:
Do you mean indenting, or wrapping?
I mean fill the line by increasing spaces between words in order to get a
paragraph aligned both side, left and right on the page.
So if the width
TheSaint wrote:
On 01:37, giovedì 12 giugno 2008 Ethan Furman wrote:
Do you mean indenting, or wrapping?
I mean fill the line by increasing spaces between words in order to get a
paragraph aligned both side, left and right on the page.
So if the width is 78 chars it wouldn't have jig saw
On Jun 11, 10:32 am, MRAB [EMAIL PROTECTED] wrote:
On Jun 10, 10:57 pm, Steven Clark [EMAIL PROTECTED] wrote:
for 1 in oids, vals head_oids:
SyntaxError: can't assign to literal
--
1 is a literal, you can't assign it to something. Are you trying to
use it as a variable name
On Jun 10, 10:57 pm, Steven Clark [EMAIL PROTECTED] wrote:
for 1 in oids, vals head_oids:
SyntaxError: can't assign to literal
--
1 is a literal, you can't assign it to something. Are you trying to
use it as a variable name?
Slightly OT, but is there an editor that can display digits
On Jun 11, 3:32 pm, MRAB [EMAIL PROTECTED] wrote:
On Jun 10, 10:57 pm, Steven Clark [EMAIL PROTECTED] wrote:
for 1 in oids, vals head_oids:
SyntaxError: can't assign to literal
--
1 is a literal, you can't assign it to something. Are you trying to
use it as a variable name
On Jun 11, 2:53 am, maehhheeyy [EMAIL PROTECTED] wrote:
this is stopping my program from running properly. is there something
wrong in my code when that happens?
That simply means you did something like this:
'hello' = 'another'
123 = 'kilo'
[12, 'asd] = 123
Sometimes it's not that obvious
On 16:47, mercoledì 11 giugno 2008 Chris wrote:
SciTE and Notepad++
Pype, spe, just to point it out. Jedit, but rather a bloatware.
I'd like to know which is the litest multi platform and indipendent.
Pype is very good when compiled in exe, but not doing in Linux in that way.
--
Mailsweeper
MRAB wrote:
On Jun 10, 10:57 pm, Steven Clark [EMAIL PROTECTED] wrote:
for 1 in oids, vals head_oids:
SyntaxError: can't assign to literal
--
1 is a literal, you can't assign it to something. Are you trying to
use it as a variable name?
Slightly OT, but is there an editor that can display
On 00:15, giovedì 12 giugno 2008 Ethan Furman wrote:
I like Vim (Vi Improved)
What about justifying text ?
--
Mailsweeper Home : http://it.geocities.com/call_me_not_now/index.html
--
http://mail.python.org/mailman/listinfo/python-list
TheSaint wrote:
On 00:15, giovedì 12 giugno 2008 Ethan Furman wrote:
I like Vim (Vi Improved)
What about justifying text ?
Do you mean indenting, or wrapping? Vim has excellent indenting
support, and Python files already included that support proper
indenting, syntax coloring, etc.
I
this is stopping my program from running properly. is there something
wrong in my code when that happens?
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 10, 12:53 pm, maehhheeyy [EMAIL PROTECTED] wrote:
this is stopping my program from running properly. is there something
wrong in my code when that happens?
yes
Post your code, or at least the full error message if you want more
details.
Matt
--
details.
Matt
for 1 in oids, vals head_oids:
SyntaxError: can't assign to literal
--
http://mail.python.org/mailman/listinfo/python-list
Post your code, or at least the full error message if you want more
details.
Matt
for 1 in oids, vals head_oids:
SyntaxError: can't assign to literal
--
http://mail.python.org/mailman/listinfo/python-list
Wow.
http://catb.org/~esr/faqs/smart-questions.html
--
http://mail.python.org
for 1 in oids, vals head_oids:
SyntaxError: can't assign to literal
--
1 is a literal, you can't assign it to something. Are you trying to
use it as a variable name?
--
http://mail.python.org/mailman/listinfo/python-list
if you want more
details.
Matt
for 1 in oids, vals head_oids:
SyntaxError: can't assign to literal
That statement makes no sense (thus SyntaxError).
for 1 (one) in oids, vals head_oids:
has several problems:
1 - for source variable can't be a number it has to be a name
in oids, vals
36 matches
Mail list logo