On Thu, 03 Dec 2015 16:30:25 -0800, Robert wrote:
> Hi,
>
> I remember that there is a way to set several list elements a same value
> with
> one line code. Excuse me, I don't remember the accurate syntax on the
> code snippet. But the basic format looks like this.
>
> 1. There is a four-eleme
from Tkinter import *
window = Tk()
canvas = Canvas(window, width=500, height=500, background="green")
canvas.pack()
def move_ball(speed_x, speed_y):
box = canvas.bbox("ball")
x1 = box[0]
y1 = box[1]
x2 = box[2]
y2 = box[3]
if x1 <= 0:
On 12/02/2015 04:08 PM, John Strick wrote:
On Wednesday, December 2, 2015 at 12:58:30 PM UTC-6, Dylan Riley wrote:
hi all,
I have been trying to figure out all day why my code is printing single
characters from my list when i print random elements using random.choice the
elements in the list a
On Thu, 3 Dec 2015 09:16:32 + (UTC), Juha Nieminen
wrote:
>In comp.lang.c++ Chris in Makati wrote:
>> On Wed, 2 Dec 2015 08:57:44 + (UTC), Juha Nieminen
>> wrote:
>>
>>>In comp.lang.c++ Steve Hayes wrote:
You download things FROM a computer, you upload them TO a computer.
>>>
>>>
On Thursday, December 3, 2015 at 7:59:16 PM UTC-5, MRAB wrote:
> On 2015-12-04 00:30, Robert wrote:
> > Hi,
> >
> > I remember that there is a way to set several list elements a same value
> > with
> > one line code. Excuse me, I don't remember the accurate syntax on the code
> > snippet. But
On 2015-12-04 00:30, Robert wrote:
Hi,
I remember that there is a way to set several list elements a same value with
one line code. Excuse me, I don't remember the accurate syntax on the code
snippet. But the basic format looks like this.
1. There is a four-element list, such as:
bb=[[[
Hi,
I remember that there is a way to set several list elements a same value with
one line code. Excuse me, I don't remember the accurate syntax on the code
snippet. But the basic format looks like this.
1. There is a four-element list, such as:
bb=[[[]],[[]],[[]],[[]]]
2. An assignment lin
On 3 Dec 2015 16:50, "Terry Reedy" wrote:
>
> On 12/3/2015 10:18 AM, Adam Funk wrote:
>>
>> On 2015-12-03, Adam Funk wrote:
>>
>>> I'm having trouble with some input files that are almost all proper
>>> UTF-8 but with a couple of troublesome characters mixed in, which I'd
>>> like to ignore instea
In a message of Thu, 03 Dec 2015 20:34:10 +0100, Laura Creighton writes:
>This in to webmaster. Somebody got an error message about their
>Tcl/Tk when they started using IDLE.
>
>They went to https://www.python.org/download/mac/tcltk/
>and, yes indeed, their tk is 8.5.9, their OS is 10.8.5 so th
In a message of Thu, 03 Dec 2015 19:17:51 +, Adam Funk writes:
>On 2015-12-03, Laura Creighton wrote:
>
>> In a message of Thu, 03 Dec 2015 15:12:15 +, Adam Funk writes:
>>>I'm having trouble with some input files that are almost all proper
>>>UTF-8 but with a couple of troublesome characte
On 2015-12-03, Laura Creighton wrote:
> In a message of Thu, 03 Dec 2015 15:12:15 +, Adam Funk writes:
>>I'm having trouble with some input files that are almost all proper
>>UTF-8 but with a couple of troublesome characters mixed in, which I'd
>>like to ignore instead of throwing ValueError.
On 2015-12-03, Terry Reedy wrote:
> fileinput is an ancient module that predates iterators (and generators)
> and context managers. Since by 2.7 open files are both context managers
> and line iterators, you can easily write your own multi-file line
> iteration that does exactly what you want.
On 2015-12-03, Peter Otten wrote:
> def my_hook_encoded(encoding, errors=None):
> import io
> def openhook(filename, mode):
> mode = mode.replace('U', '').replace('b', '') or 'r'
> return io.open(
> filename, mode,
> encoding=encoding, newline='',
This in to webmaster. Somebody got an error message about their
Tcl/Tk when they started using IDLE.
They went to https://www.python.org/download/mac/tcltk/
and, yes indeed, their tk is 8.5.9, their OS is 10.8.5 so they
have a problem. They downloaded the patch from ActiveState,
and did _somet
Am 03.12.2015 um 18:23 schrieb Terry Reedy:
On 12/3/2015 11:00 AM, Robin Koch wrote:
Am 03.12.2015 um 10:02 schrieb Gary Herron:
On 12/02/2015 10:55 PM, Robert wrote:
Hi,
I read the tutorial on "Why is join() a string method instead of a list
or tuple method?"
at link:
https://docs.python.o
Am 03.12.2015 um 18:42 schrieb Mark Lawrence:
On 03/12/2015 17:01, Robin Koch wrote:
Am 03.12.2015 um 17:25 schrieb Ian Kelly:
On Thu, Dec 3, 2015 at 9:00 AM, Robin Koch
wrote:
Now *I* am confused.
Shouldn't it be
", ".join(['1', '2', '4', '8', '16'])
instead? Without any importing?
That
On 03/12/2015 17:01, Robin Koch wrote:
Am 03.12.2015 um 17:25 schrieb Ian Kelly:
On Thu, Dec 3, 2015 at 9:00 AM, Robin Koch
wrote:
Now *I* am confused.
Shouldn't it be
", ".join(['1', '2', '4', '8', '16'])
instead? Without any importing?
That would be the normal way to write it. The FAQ e
On 12/3/2015 11:00 AM, Seymore4Head wrote:
On Thu, 3 Dec 2015 00:47:42 +, MRAB
wrote:
On 2015-12-02 23:50, Seymore4Head wrote:
I have a text file I would like to search through but I have tried it
before. I don't remember why they are not compatible together, but I
wanted to ask to make
On 12/3/2015 11:00 AM, Robin Koch wrote:
Am 03.12.2015 um 10:02 schrieb Gary Herron:
On 12/02/2015 10:55 PM, Robert wrote:
Hi,
I read the tutorial on "Why is join() a string method instead of a list
or tuple method?"
at link:
https://docs.python.org/2/faq/design.html#why-must-self-be-used-ex
On Thursday, December 3, 2015 at 8:44:30 AM UTC-5, Mark Lawrence wrote:
> On 03/12/2015 12:30, eclectic...@gmail.com wrote:
> > The GNU Project has announced the release of nCurses 6.0.
> >
> > With it, Python curses would be able to support 256 colors instead of the
> > current 8 or 16.
> >
> > I
Am 03.12.2015 um 17:25 schrieb Ian Kelly:
On Thu, Dec 3, 2015 at 9:00 AM, Robin Koch wrote:
Now *I* am confused.
Shouldn't it be
", ".join(['1', '2', '4', '8', '16'])
instead? Without any importing?
That would be the normal way to write it. The FAQ entry is suggesting
the string module fun
On 12/3/2015 10:18 AM, Adam Funk wrote:
On 2015-12-03, Adam Funk wrote:
I'm having trouble with some input files that are almost all proper
UTF-8 but with a couple of troublesome characters mixed in, which I'd
like to ignore instead of throwing ValueError. I've found the
openhook for the encod
In a message of Thu, 03 Dec 2015 15:12:15 +, Adam Funk writes:
>I'm having trouble with some input files that are almost all proper
>UTF-8 but with a couple of troublesome characters mixed in, which I'd
>like to ignore instead of throwing ValueError. I've found the
>openhook for the encoding
>
I have a Python2 program which runs fine on Windows 7, but
crashes on Windows 2008 Server R2 64 bit:
downloading http://fex.belwue.de/download/7za.exe
Traceback (most recent call last):
File "", line 1992, in
File "", line 180, in main
File "", line 329, in get_ID
File "", line 1627, in c
On Thu, Dec 3, 2015 at 9:00 AM, Robin Koch wrote:
> Now *I* am confused.
>
> Shouldn't it be
>
> ", ".join(['1', '2', '4', '8', '16'])
>
> instead? Without any importing?
That would be the normal way to write it. The FAQ entry is suggesting
the string module function as an alternative for those w
On 2015-12-03 16:00, Robin Koch wrote:
Am 03.12.2015 um 10:02 schrieb Gary Herron:
On 12/02/2015 10:55 PM, Robert wrote:
Hi,
I read the tutorial on "Why is join() a string method instead of a list
or tuple method?"
at link:
https://docs.python.org/2/faq/design.html#why-must-self-be-used-expl
On 12/3/2015 7:28 AM, Mark Lawrence wrote:
On 03/12/2015 01:15, c.bu...@posteo.jp wrote:
I would like to know how this could be done more elegant/pythonic.
I have a big list (over 10.000 items) with strings (each 100 to 300
chars long) and want to filter them.
list = .
for item in list[:]
On 2015-12-03 15:12, Adam Funk wrote:
I'm having trouble with some input files that are almost all proper
UTF-8 but with a couple of troublesome characters mixed in, which I'd
like to ignore instead of throwing ValueError. I've found the
openhook for the encoding
for line in fileinput.input(opt
Adam Funk wrote:
> On 2015-12-03, Adam Funk wrote:
>
>> I'm having trouble with some input files that are almost all proper
>> UTF-8 but with a couple of troublesome characters mixed in, which I'd
>> like to ignore instead of throwing ValueError. I've found the
>> openhook for the encoding
>>
>>
On Thu, 03 Dec 2015 01:54:16 +0100, Laura Creighton
wrote:
>In a message of Wed, 02 Dec 2015 18:50:34 -0500, Seymore4Head writes:
>>I have a text file I would like to search through but I have tried it
>>before. I don't remember why they are not compatible together, but I
>>wanted to ask to make
Am 03.12.2015 um 10:02 schrieb Gary Herron:
On 12/02/2015 10:55 PM, Robert wrote:
Hi,
I read the tutorial on "Why is join() a string method instead of a list
or tuple method?"
at link:
https://docs.python.org/2/faq/design.html#why-must-self-be-used-explicitly-in-method-definitions-and-calls
On Thu, 3 Dec 2015 00:47:42 +, MRAB
wrote:
>On 2015-12-02 23:50, Seymore4Head wrote:
>> I have a text file I would like to search through but I have tried it
>> before. I don't remember why they are not compatible together, but I
>> wanted to ask to make sure.
>>
>> I know I can convert the
On 2015-12-03, Adam Funk wrote:
> I'm having trouble with some input files that are almost all proper
> UTF-8 but with a couple of troublesome characters mixed in, which I'd
> like to ignore instead of throwing ValueError. I've found the
> openhook for the encoding
>
> for line in fileinput.input
I'm having trouble with some input files that are almost all proper
UTF-8 but with a couple of troublesome characters mixed in, which I'd
like to ignore instead of throwing ValueError. I've found the
openhook for the encoding
for line in fileinput.input(options.files,
openhook=fileinput.hook_enc
Denis McMahon writes:
> On Thu, 03 Dec 2015 08:32:49 +0200, Jussi Piitulainen wrote:
>
>> def isbad(item):
>> return ( 'Banana' in item or
>> 'Car' in item )
>>
>> def isgood(item)
>> return not isbad(item)
>
> badthings = [ 'Banana', 'Car', ]
>
> def isgood(item)
>
On Thu, 03 Dec 2015 08:32:49 +0200, Jussi Piitulainen wrote:
> def isbad(item):
> return ( 'Banana' in item or
> 'Car' in item )
>
> def isgood(item)
> return not isbad(item)
badthings = [ 'Banana', 'Car', ]
def isgood(item)
for thing in badthings:
if thi
On 03/12/2015 12:30, eclectic...@gmail.com wrote:
The GNU Project has announced the release of nCurses 6.0.
With it, Python curses would be able to support 256 colors instead of the
current 8 or 16.
I've discovered that a pre-release of Fedora 24 includes ncurses 6.0. It is not usable by
Pyth
The GNU Project has announced the release of nCurses 6.0.
With it, Python curses would be able to support 256 colors instead of the
current 8 or 16.
I've discovered that a pre-release of Fedora 24 includes ncurses 6.0. It is not
usable by Python programs, such as my character-mode emulation of
On 03/12/2015 01:15, c.bu...@posteo.jp wrote:
I would like to know how this could be done more elegant/pythonic.
I have a big list (over 10.000 items) with strings (each 100 to 300
chars long) and want to filter them.
list = .
for item in list[:]:
if 'Banana' in item:
list.remove(
On 03/12/15 02:15, c.bu...@posteo.jp wrote:
I would like to know how this could be done more elegant/pythonic.
I have a big list (over 10.000 items) with strings (each 100 to 300
chars long) and want to filter them.
list = .
for item in list[:]:
if 'Banana' in item:
list.remove(it
writes:
> Thank you for your suggestion. This will help a lot.
>
> On 2015-12-03 08:32 Jussi Piitulainen wrote:
>> list = [ item for item in list
>> if ( 'Banana' not in item and
>> 'Car' not in item ) ]
>
> I often saw constructions like this
> x for x in y if ...
> But
Laura Creighton wrote:
> In a message of Thu, 03 Dec 2015 10:27:19 +0100, c.bu...@posteo.jp writes:
>>Thank you for your suggestion. This will help a lot.
>>
>>On 2015-12-03 08:32 Jussi Piitulainen wrote:
>>> list = [ item for item in list
>>> if ( 'Banana' not in item and
>>>
On 2015-12-02, jorge.conr...@cptec.inpe.br wrote:
> I do not understand this message. Atached it my code.
I'm new to Usenet, so maybe it's my fault. But I can't find any attachment
in your message.
Would you mind to post the code?
--
https://mail.python.org/mailman/listinfo/python-list
On 12/03/2015 10:27 AM, c.bu...@posteo.jp wrote:
I often saw constructions like this
x for x in y if ...
But I don't understand that combination of the Python keywords (for,
in, if) I allready know. It is to complex to imagine what there really
happen.
I understand this
for x in y:
if
In a message of Thu, 03 Dec 2015 10:27:19 +0100, c.bu...@posteo.jp writes:
>Thank you for your suggestion. This will help a lot.
>
>On 2015-12-03 08:32 Jussi Piitulainen wrote:
>> list = [ item for item in list
>> if ( 'Banana' not in item and
>> 'Car' not in item ) ]
>
>I o
On 03.12.2015 10:27, c.bu...@posteo.jp wrote:
>
> I often saw constructions like this
>x for x in y if ...
> But I don't understand that combination of the Python keywords (for,
> in, if) I allready know. It is to complex to imagine what there really
> happen.
>
> I understand this
>for x
On Thu, Dec 3, 2015 at 8:27 PM, wrote:
> Thank you for your suggestion. This will help a lot.
>
> On 2015-12-03 08:32 Jussi Piitulainen wrote:
>> list = [ item for item in list
>> if ( 'Banana' not in item and
>> 'Car' not in item ) ]
>
> I often saw constructions like thi
Thank you for your suggestion. This will help a lot.
On 2015-12-03 08:32 Jussi Piitulainen wrote:
> list = [ item for item in list
> if ( 'Banana' not in item and
> 'Car' not in item ) ]
I often saw constructions like this
x for x in y if ...
But I don't understand that
In comp.lang.c++ Chris in Makati wrote:
> On Wed, 2 Dec 2015 08:57:44 + (UTC), Juha Nieminen
> wrote:
>
>>In comp.lang.c++ Steve Hayes wrote:
>>> You download things FROM a computer, you upload them TO a computer.
>>
>>It's a matter of perspective. If a hacker breaks into your computer and
On Thu, Dec 3, 2015 at 8:00 PM, David Brown wrote:
> Even if the OP is telling the truth (and if Skybuck said that
> grass is green, I'd recommend going outside to check)
Here in Australia, we're coming up on summer, so grass is more likely
to be yellowish-brown. Definitely don't believe people w
Op 02-12-15 om 21:30 schreef Ian Kelly:
> A person can hold one opinion in some contexts and an opposing opinion
> in others.
Yes people are capable of that. It doesn't mean we shouldn't challenge them
on that. There are many possibilities for people to act like that. One
context can be sufficient
On 03/12/15 07:24, Chris in Makati wrote:
> On Wed, 2 Dec 2015 08:57:44 + (UTC), Juha Nieminen
> wrote:
>
>> In comp.lang.c++ Steve Hayes wrote:
>>> You download things FROM a computer, you upload them TO a computer.
>>
>> It's a matter of perspective. If a hacker breaks into your computer a
On 12/02/2015 10:55 PM, Robert wrote:
Hi,
I read the tutorial on "Why is join() a string method instead of a list
or tuple method?"
at link:
https://docs.python.org/2/faq/design.html#why-must-self-be-used-explicitly-in-method-definitions-and-calls
I have a problem on running the last line:
--
On 03Dec2015 12:20, Ganesh Pal wrote:
I would need few tips from your past experiences on how to store
the test logs
My requirement is to capture log under /var/log/ directory every time
the test is run .
Normally /var/log itself is only writable by root. Unless you are running your
test
On Thursday, December 3, 2015 at 12:40:52 PM UTC+5:45, Robert wrote:
> Hi,
>
> I read the tutorial on "Why is join() a string method instead of a list
> or tuple method?"
> at link:
> https://docs.python.org/2/faq/design.html#why-must-self-be-used-explicitly-in-method-definitions-and-calls
>
> I
55 matches
Mail list logo