Re: Can signal.alarm be safely cleared in python?

2016-11-18 Thread dieter
Pedro Franco de Carvalho writes: > Assume a python program sets a handler function for the > `signal.SIGALRM` signal, and then schedules an alarm in T seconds with > `signal.alarm(T)`. > > Assume the program later cancels any scheduled alarm with `signal.alarm(0)`. I do not think so. You might h

Re: how to simulate the situation in DNA evolution for finding the minimum population needed and minimum samples selected to mating in order to no extinction in any one of original species and new spe

2016-11-18 Thread meInvent bbird
i noticed the faces of human repeated or similar, and would like to prove whether evolution a several generations will return to the original intelligence of ancester On Friday, November 18, 2016 at 1:55:31 PM UTC+8, meInvent bbird wrote: > how to simulate the situation in DNA evolution for find

Re: Can signal.alarm be safely cleared in python?

2016-11-18 Thread Chris Angelico
On Fri, Nov 18, 2016 at 7:51 PM, dieter wrote: > Pedro Franco de Carvalho writes: > >> Assume a python program sets a handler function for the >> `signal.SIGALRM` signal, and then schedules an alarm in T seconds with >> `signal.alarm(T)`. >> >> Assume the program later cancels any scheduled alarm

IDLEX association

2016-11-18 Thread Luis Marzulli
Hi When I double click a .py file, a windows appears and immediately disappears. How can I associate the .py file extension to the IDLEX EDITOR? Thanks -- https://mail.python.org/mailman/listinfo/python-list

Style().configure don't works for all widgets

2016-11-18 Thread Luis Marzulli
Hi Why ttk.Style().configure(".", font=('Courier New', 30, "bold")) works for Button and Label widgets (and maybe others) and don't works for Entry widget? Example in Python 3: from tkinter import * from tkinter import ttk from tkinter import font root = Tk() ttk.Style().configure(".", font=(

Encountering fatal error x80070643 while installing Python

2016-11-18 Thread Irene Venditti
Hi everybody, I've got a problem with the installation of Python. I am a translator and currently I'm translating a book on programming Minecraft with Python, from English to Dutch. My computer is a Windows 10 computer, 64-bits (Toshiba Qosmio all in one). I already had a 2.7 version of

need help to get my python image to move around using tkinter

2016-11-18 Thread twgrops--- via Python-list
Hi I am new here and to python, I am currently studying towards my degree in computer science and have to build a program but I have hit a brick wall. I am trying to make an image move around the canvas. I can make a rectangle move using the following: #test rectangle id1=canvas.create_rectangl

ANN: eGenix PyRun - One file Python Runtime 2.2.2

2016-11-18 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix PyRun - One file Python Runtime Version 2.2.2 An easy-to-use single file relocatable Python run-time - available for Linux, Mac OS X and Unix

Re: ANN: eGenix PyRun - One file Python Runtime 2.2.2

2016-11-18 Thread Grant Edwards
On 2016-11-18, eGenix Team: M.-A. Lemburg wrote: > eGenix PyRun is our open source, one file, no installation version of > Python, making the distribution of a Python interpreter to run based > scripts and applications What's a "based" script? -- Grant Edwards grant.b.edwards

Re: Style().configure don't works for all widgets

2016-11-18 Thread Peter Otten
Luis Marzulli wrote: > ttk.Style().configure(".", font=('Courier New', 30, "bold")) > > works for Button and Label widgets (and maybe others) and don't works for > Entry widget? > > Example in Python 3: > from tkinter import * > from tkinter import ttk > from tkinter import font > > root = Tk()

Re: Encountering fatal error x80070643 while installing Python

2016-11-18 Thread MRAB
On 2016-11-18 11:40, Irene Venditti wrote: Hi everybody, I've got a problem with the installation of Python. I am a translator and currently I'm translating a book on programming Minecraft with Python, from English to Dutch. My computer is a Windows 10 computer, 64-bits (Toshiba Qosmio all in

Parsing a single-level JSON file

2016-11-18 Thread mike . reider
hi all, Im reading in a JSON file that looks like this [ { "name":"myField1", "searchable":true, "navigable":true, "custom":true, "clauseNames":[ "cf[10190]", "Log Details" ], "orderable":true, "id":"customfield_10190",

Re: Parsing a single-level JSON file

2016-11-18 Thread John Gordon
In mike.rei...@gmail.com writes: > Im reading in a JSON file that looks like this > ... snip ... > Lets say I want to get the ID # of MyField1, how can I parse this with > json lib? Theyre all on the same level, not sure how to target it to go > to MyField1 and get "id" value. That data looks

Re: Parsing a single-level JSON file

2016-11-18 Thread John Gordon
In John Gordon writes: > In > mike.rei...@gmail.com writes: > with open("json.dat", "r") as fp: > data = json.load(fp) > for item in data: > if item['name'] == 'myField2': Oops, that should be 'myField1' of course. -- John Gordon A is for A

Re: Parsing a single-level JSON file

2016-11-18 Thread MRAB
On 2016-11-18 18:23, mike.rei...@gmail.com wrote: hi all, Im reading in a JSON file that looks like this [ { "name":"myField1", "searchable":true, "navigable":true, "custom":true, "clauseNames":[ "cf[10190]", "Log Details" ], "orde

Re: Parsing a single-level JSON file

2016-11-18 Thread Peter Otten
mike.rei...@gmail.com wrote: > hi all, > > Im reading in a JSON file that looks like this > > > [ >{ > "name":"myField1", > "searchable":true, > "navigable":true, > "custom":true, > "clauseNames":[ > "cf[10190]", > "Log Details" > ],

Re: need help to get my python image to move around using tkinter

2016-11-18 Thread Peter Otten
twgrops--- via Python-list wrote: > Hi I am new here and to python, > > I am currently studying towards my degree in computer science and have to > build a program but I have hit a brick wall. I am trying to make an image > move around the canvas. I can make a rectangle move using the following:

Re: Parsing a single-level JSON file

2016-11-18 Thread mike . reider
On Friday, November 18, 2016 at 1:23:18 PM UTC-5, mike@gmail.com wrote: > hi all, > > Im reading in a JSON file that looks like this > > > [ >{ > "name":"myField1", > "searchable":true, > "navigable":true, > "custom":true, > "clauseNames":[ >

Re: Parsing a single-level JSON file

2016-11-18 Thread mike . reider
the end result file looks like this cat fields.json {"myField1": {"id": "customfield_10600"}, "myField2": {"id": "customfield_11334"}, "myField3": {"id": "customfield_993434"}, etc etc -- https://mail.python.org/mailman/listinfo/python-list

Re: need help to get my python image to move around using tkinter

2016-11-18 Thread Thomas Grops via Python-list
thankyou so much, that is the exact help I required to put me in the right direction :D -- https://mail.python.org/mailman/listinfo/python-list

Re: Encountering fatal error x80070643 while installing Python

2016-11-18 Thread eryk sun
On Fri, Nov 18, 2016 at 5:55 PM, MRAB wrote: > On 2016-11-18 11:40, Irene Venditti wrote: >> >> This didn't seem to be a problem, since version 3.5.1 installed to my >> C:\Users\username\appdata\local\... directory. But when I tried to install >> Python 3.5.2 and uninstalled both previous versions

Re: IDLEX association

2016-11-18 Thread eryk sun
On Fri, Nov 18, 2016 at 7:09 PM, Dennis Lee Bieber wrote: > On Fri, 18 Nov 2016 04:46:46 -0800 (PST), Luis Marzulli > declaimed the following: > >>When I double click a .py file, a windows appears and immediately disappears. >>How can I associate the .py file extension to the IDLEX EDITOR? > >

How to append a modified list into a list?

2016-11-18 Thread jfong
I have a working list 'tbl' and recording list 'm'. I want to append 'tbl' into 'm' each time when the 'tbl' was modified. I will record the change by append it through the function 'apl'. For example: >>>tbl=[0,0] >>>m=[] >>>tbl[0]=1 >>>apl(tbl) >>>m [[1,0]] >>>tbl[1]=2 >>>apl(tbl) >>>m [[1,

how to multiply two matrices with different size?

2016-11-18 Thread limetree377
Hi :) I'm trying to multiply two matrices that has different size. -code- import numpy as np a = np.random.randn(4, 3) b = np.random.randn(4, 1) print a print b -code- How s

Re: how to multiply two matrices with different size?

2016-11-18 Thread Ian Kelly
On Fri, Nov 18, 2016 at 6:51 PM, wrote: > Hi :) > I'm trying to multiply two matrices that has different size. > > -code- > > import numpy as np > > a = np.random.randn(4, 3) > b = np.random.randn(4, 1) > > print a > print b > >

Re: How to append a modified list into a list?

2016-11-18 Thread Ian Kelly
On Nov 18, 2016 6:47 PM, wrote: I have a working list 'tbl' and recording list 'm'. I want to append 'tbl' into 'm' each time when the 'tbl' was modified. I will record the change by append it through the function 'apl'. For example: >>>tbl=[0,0] >>>m=[] >>>tbl[0]=1 >>>apl(tbl) >>>m [[1,0]] >

Re: How to append a modified list into a list?

2016-11-18 Thread Steve D'Aprano
On Sat, 19 Nov 2016 12:44 pm, jf...@ms4.hinet.net wrote: > I have a working list 'tbl' and recording list 'm'. I want to append 'tbl' > into 'm' each time when the 'tbl' was modified. I will record the change > by append it through the function 'apl'. [...] > Obviously the most intuitive way doesn

Re: help on "from deen import *" vs. "import deen"

2016-11-18 Thread Steve D'Aprano
On Sat, 19 Nov 2016 05:50 am, Dennis Lee Bieber wrote: > Python's name binding is very easy to state in English: Assignment in > Python attaches the name (on the left hand side of the statement) to the > object (that is the result of the right hand side). What do you mean "attach"? What's a name?

Re: How to append a modified list into a list?

2016-11-18 Thread jfong
Oh, I don't know slice well enough:-( So, slice tbl[:] will create a new object (a copy of tbl) which can be passed as a function argument m.append(tbl[:]) or bind to a new name w=tbl[:] or re-bind to itself w[:]=tbl Thanks you, Ian and Steve. Steve D'Aprano at 2016/11/19 11:01:26AM wrote: >

Re: help on "from deen import *" vs. "import deen"

2016-11-18 Thread Chris Angelico
On Sat, Nov 19, 2016 at 3:34 PM, Steve D'Aprano wrote: > What happens if you do this? > > spam = eggs = cheese = obj > > Is that different from: > > spam = obj > eggs = obj > cheese = obj > > > or from this? > > spam = obj > eggs = spam > cheese = eggs > ... > These aren't silly questions. Indeed