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 wan
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" UUID="1084
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 this
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 start
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" UUID="108
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 = self._helper.execut
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=", 1)[1]
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" UUID="1084
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 outp
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 | g
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 return
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 'c
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 liter
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 ch
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 : http://it.geocities.com/call_
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 f
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 end
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 t
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,
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
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
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 i
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 Ho
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 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
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
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 variabl
e full error message 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
>
> 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
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
>
> for 1 in oids, vals head_oids:
> SyntaxError: can't assign to
ode, 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
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
--
http://mail.python.org/mailman/listinf
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
36 matches
Mail list logo