Rick Johnson writes:
>> There is now also a line that starts with: PCH_CPU_TEMP:
>> And I do not want that one.
>
> Yes. But be aware, that while the `str.startswith(target)`
> method is indeed more efficient than a more generalized
> "inclusion test", if the target
On Monday, December 4, 2017 at 9:44:27 AM UTC, Cecil Westerhof wrote:
> I have a script that was running perfectly for some time. It uses:
> array = [elem for elem in output if 'CPU_TEMP' in elem]
>
> But because output has changed, I have to check for CPU_TEMP at the
> beginning of the line.
Neil Cerutti writes:
> On 2017-12-04, Cecil Westerhof wrote:
>> Joel Goldstick writes:
>>
>>> On Mon, Dec 4, 2017 at 5:21 AM, Ned Batchelder
>>> wrote:
>>>
On 12/4/17 4:36 AM, Cecil Westerhof wrote:
On 2017-12-04, Cecil Westerhof wrote:
> Joel Goldstick writes:
>
>> On Mon, Dec 4, 2017 at 5:21 AM, Ned Batchelder
>> wrote:
>>
>>> On 12/4/17 4:36 AM, Cecil Westerhof wrote:
>>>
I have a script that was running perfectly
On 12/4/2017 11:14 AM, Ned Batchelder wrote:
> On 12/4/17 9:13 AM, Rick Johnson wrote:
>> Perhaps it's not politically correct for me to say this, but
>> i've never been one who cared much about political
>> correctness, so i'm just going to say it...
>
> Cecil, feel free to ignore the rest of
On 12/4/17 9:13 AM, Rick Johnson wrote:
> Perhaps it's not politically correct for me to say this, but
> i've never been one who cared much about political
> correctness, so i'm just going to say it...
Cecil, feel free to ignore the rest of Rick's message.â His messages are
famous for their
On Mon, Dec 4, 2017 at 5:21 AM, Ned Batchelder wrote:
> On 12/4/17 4:36 AM, Cecil Westerhof wrote:
>
>> I have a script that was running perfectly for some time. It uses:
>> array = [elem for elem in output if 'CPU_TEMP' in elem]
>>
>> But because output has changed,
Cecil Westerhof wrote:
> Joel Goldstick writes:
[...]
> > I like Ned's clear answer, but I'm wondering why the
> > original code would fail because the substring is at the
> > start of the line, since 'in' would still be true no
> > matter where the desired string is placed. It would be
> >
Joel Goldstick writes:
> On Mon, Dec 4, 2017 at 5:21 AM, Ned Batchelder
> wrote:
>
>> On 12/4/17 4:36 AM, Cecil Westerhof wrote:
>>
>>> I have a script that was running perfectly for some time. It uses:
>>> array = [elem for elem in output
On 12/4/17 4:36 AM, Cecil Westerhof wrote:
> I have a script that was running perfectly for some time. It uses:
> array = [elem for elem in output if 'CPU_TEMP' in elem]
>
> But because output has changed, I have to check for CPU_TEMP at the
> beginning of the line. What would be the best way
Ned Batchelder writes:
> On 12/4/17 4:36 AM, Cecil Westerhof wrote:
>> I have a script that was running perfectly for some time. It uses:
>> array = [elem for elem in output if 'CPU_TEMP' in elem]
>>
>> But because output has changed, I have to check for CPU_TEMP at
Neil Cerutti writes:
> On 2017-12-04, Cecil Westerhof wrote:
>> Joel Goldstick writes:
>>
>>> On Mon, Dec 4, 2017 at 5:21 AM, Ned Batchelder
>>> wrote:
>>>
On 12/4/17 4:36 AM, Cecil Westerhof wrote:
Rick Johnson writes:
>> There is now also a line that starts with: PCH_CPU_TEMP:
>> And I do not want that one.
>
> Yes. But be aware, that while the `str.startswith(target)`
> method is indeed more efficient than a more generalized
> "inclusion test", if the target
On 2017-12-04, Cecil Westerhof wrote:
> Joel Goldstick writes:
>
>> On Mon, Dec 4, 2017 at 5:21 AM, Ned Batchelder
>> wrote:
>>
>>> On 12/4/17 4:36 AM, Cecil Westerhof wrote:
>>>
I have a script that was running perfectly
On 12/4/2017 11:14 AM, Ned Batchelder wrote:
On 12/4/17 9:13 AM, Rick Johnson wrote:
Perhaps it's not politically correct for me to say this, but
i've never been one who cared much about political
correctness, so i'm just going to say it...
Cecil, feel free to ignore the rest of Rick's
On 12/4/17 9:13 AM, Rick Johnson wrote:
Perhaps it's not politically correct for me to say this, but
i've never been one who cared much about political
correctness, so i'm just going to say it...
Cecil, feel free to ignore the rest of Rick's message. His messages are
famous for their
Cecil Westerhof wrote:
> Joel Goldstick writes:
[...]
> > I like Ned's clear answer, but I'm wondering why the
> > original code would fail because the substring is at the
> > start of the line, since 'in' would still be true no
> > matter where the desired string is placed. It would be
> >
Joel Goldstick writes:
> On Mon, Dec 4, 2017 at 5:21 AM, Ned Batchelder
> wrote:
>
>> On 12/4/17 4:36 AM, Cecil Westerhof wrote:
>>
>>> I have a script that was running perfectly for some time. It uses:
>>> array = [elem for elem in output
Ned Batchelder writes:
> On 12/4/17 4:36 AM, Cecil Westerhof wrote:
>> I have a script that was running perfectly for some time. It uses:
>> array = [elem for elem in output if 'CPU_TEMP' in elem]
>>
>> But because output has changed, I have to check for CPU_TEMP at
On Mon, Dec 4, 2017 at 5:21 AM, Ned Batchelder
wrote:
> On 12/4/17 4:36 AM, Cecil Westerhof wrote:
>
>> I have a script that was running perfectly for some time. It uses:
>> array = [elem for elem in output if 'CPU_TEMP' in elem]
>>
>> But because output has changed,
On 12/4/17 4:36 AM, Cecil Westerhof wrote:
I have a script that was running perfectly for some time. It uses:
array = [elem for elem in output if 'CPU_TEMP' in elem]
But because output has changed, I have to check for CPU_TEMP at the
beginning of the line. What would be the best way to
On Monday, December 4, 2017 at 9:44:27 AM UTC, Cecil Westerhof wrote:
> I have a script that was running perfectly for some time. It uses:
> array = [elem for elem in output if 'CPU_TEMP' in elem]
>
> But because output has changed, I have to check for CPU_TEMP at the
> beginning of the line.
22 matches
Mail list logo