Re: Python3.6 tkinter bug?

2017-01-31 Thread Christian Gollwitzer
Am 01.02.17 um 00:02 schrieb MRAB: On 2017-01-31 22:34, Christian Gollwitzer wrote: .!frame.!checkbutton .!frame.!checkbutton2 .!frame2.!checkbutton .!frame2.!checkbutton2 Perhaps someone who knows Tcl and tk can tell me, but I notice that in the first example, the second part of the widget

Re: SQL CE Database (.sdf) file connection with python

2017-01-31 Thread MRAB
On 2017-02-01 00:45, Jay Desai wrote: Hello, I came across a post from Nikhil Joshi at https://mail.python.org/pipermail/python-list/2014-November/681568.html. *.sdf database access - mail.python.org mail.python.org On

Qtcore error problem

2017-01-31 Thread Xiao Zhang
Dear python users, I am new to python and now I met a problem. When I try to run a py file, I got the following error: from vacumm.misc.grid.regridding import regrid2d File "/home/xzhang3/usr/local/uvcdat/2.4.1/lib/python2.7/site-packages/vacumm/misc/__init__.py", line 41, in import co

SQL CE Database (.sdf) file connection with python

2017-01-31 Thread Jay Desai
Hello, I came across a post from Nikhil Joshi at https://mail.python.org/pipermail/python-list/2014-November/681568.html. *.sdf database access - mail.python.org mail.python.org On Saturday, April 21, 2012 6:55:55 AM UTC-

Re: Python3.6 tkinter bug

2017-01-31 Thread George Trojan - NOAA Federal
On 2017-01-31 18:02, MRAB wrote: On 2017-01-31 22:34, Christian Gollwitzer wrote: > >* Am 31.01.17 um 20:18 schrieb George Trojan - NOAA Federal: > *>>* Selection of button 'A' also selects button 'C'. Same goes for 'B' and > 'D'. > *>>* I noticed that widget names have changed, which likely lead

Re: command line micro wiki written in Python

2017-01-31 Thread Ben Finney
Paul Wolf writes: > I've created a command line utility for managing text files. It's > written in Python: […] Thank you. > The key aspects are > > * Entirely command-line driven > > * Text documents only with a slight preference for Markdown The Python community has a stronger (?) preference

Re: Python3.6 tkinter bug?

2017-01-31 Thread MRAB
On 2017-01-31 22:34, Christian Gollwitzer wrote: Am 31.01.17 um 20:18 schrieb George Trojan - NOAA Federal: Selection of button 'A' also selects button 'C'. Same goes for 'B' and 'D'. I noticed that widget names have changed, which likely leads to the cause: /usr/local/Python-3.5.1/bin/python3

What's the best python projects book

2017-01-31 Thread Marvin Sinclair
Am a newbie to python, just to completed reading and practice a python book, but I wanted to know if there is a good python book that is composed of different projects on different topics that I can code along, read what is happening so i can gain more experience, please suggest me any, or if y

Re: Python3.6 tkinter bug?

2017-01-31 Thread Christian Gollwitzer
Am 31.01.17 um 20:18 schrieb George Trojan - NOAA Federal: Selection of button 'A' also selects button 'C'. Same goes for 'B' and 'D'. I noticed that widget names have changed, which likely leads to the cause: /usr/local/Python-3.5.1/bin/python3 foo.py .140182648425776.140182647743208 .1401826

Embedding python, run a function and get it's result

2017-01-31 Thread Charles Heizer
Hello, I'm messing around with the embedded python and I can get parts to work. What I'm having a hard time is getting my head around calling a function in the python string and getting it's result. Question, how do I load the python script and call runMe() and get it's value? Thanks! Example

Re: What are your opinions on .NET Core vs Python?

2017-01-31 Thread Gregory Ewing
Ian Kelly wrote: Java also has "static import" which lets you individually import specific static methods or fields from a class. Yes, but it's nowhere near as convenient as Python's import. To import individual names you have to qualify all of them with the whole package name, and there is no

Re: Python3.6 tkinter bug?

2017-01-31 Thread Terry Reedy
On 1/31/2017 4:11 PM, Terry Reedy wrote: On 1/31/2017 3:43 PM, MRAB wrote: On 2017-01-31 19:18, George Trojan - NOAA Federal wrote: The following program behaves differently under Python 3.6: ''' checkbutton test ''' import tkinter class GUI(tkinter.Tk): def __init__(self): tkint

Re: Overriding True and False ?

2017-01-31 Thread jladasky
On Sunday, January 29, 2017 at 11:29:29 PM UTC-8, Irv Kalb wrote: > It seems very odd that Python allows you to override the values of > True and False. Hi Irv, Let me join the chorus of people who are encouraging you to switch to Python3, which corrects this problem. Overriding builtins has

DJANGO IMAGES QUESTION

2017-01-31 Thread Xristos Xristoou
who is the better method to take images from uses(visitors) on my web site and to return the new images(processing) back to users using DJANGO? i am new i dont know how to connect my python script with the html templetes to take the images and how to return? for example my script take images paths

Re: sorting a list of dicts by a computed field

2017-01-31 Thread jladasky
On Tuesday, January 31, 2017 at 12:34:38 PM UTC-8, MRAB wrote: > On 2017-01-31 20:26, Larry Martell wrote: > The module 'datetime' contains a class called 'datetime'. Judging by > your exception, 'datetime' is the module. > > Try "datetime.datetime.strptime" instead. This re-use of the name "da

Re: Python3.6 tkinter bug?

2017-01-31 Thread Terry Reedy
On 1/31/2017 3:43 PM, MRAB wrote: On 2017-01-31 19:18, George Trojan - NOAA Federal wrote: The following program behaves differently under Python 3.6: ''' checkbutton test ''' import tkinter class GUI(tkinter.Tk): def __init__(self): tkinter.Tk.__init__(self) frame = tkint

Re: sorting a list of dicts by a computed field

2017-01-31 Thread Larry Martell
On Tue, Jan 31, 2017 at 3:30 PM, Chris Angelico wrote: > On Wed, Feb 1, 2017 at 7:26 AM, Larry Martell wrote: >> I have a list of dicts and one item of the dict is a date in m/d/Y >> format. I want to sort by that. I tried this: >> >> sorted(data['trends'], key=lambda k: >> datetime.strptime(k['d

Re: Python3.6 tkinter bug?

2017-01-31 Thread MRAB
On 2017-01-31 19:18, George Trojan - NOAA Federal wrote: The following program behaves differently under Python 3.6: ''' checkbutton test ''' import tkinter class GUI(tkinter.Tk): def __init__(self): tkinter.Tk.__init__(self) frame = tkinter.Frame(self) for tag in (

Re: sorting a list of dicts by a computed field

2017-01-31 Thread Michael Torrie
On 01/31/2017 01:26 PM, Larry Martell wrote: > I have a list of dicts and one item of the dict is a date in m/d/Y > format. I want to sort by that. I tried this: > > sorted(data['trends'], key=lambda k: > datetime.strptime(k['date_time'],'%m/%d/%Y')) > > But that fails with: > > Exception Type:

Re: sorting a list of dicts by a computed field

2017-01-31 Thread MRAB
On 2017-01-31 20:26, Larry Martell wrote: I have a list of dicts and one item of the dict is a date in m/d/Y format. I want to sort by that. I tried this: sorted(data['trends'], key=lambda k: datetime.strptime(k['date_time'],'%m/%d/%Y')) But that fails with: Exception Type: AttributeError at /

Re: sorting a list of dicts by a computed field

2017-01-31 Thread Kev Dwyer
Larry Martell wrote: > I have a list of dicts and one item of the dict is a date in m/d/Y > format. I want to sort by that. I tried this: > > sorted(data['trends'], key=lambda k: > datetime.strptime(k['date_time'],'%m/%d/%Y')) > > But that fails with: > > Exception Type: AttributeError at > /re

Re: sorting a list of dicts by a computed field

2017-01-31 Thread Chris Angelico
On Wed, Feb 1, 2017 at 7:26 AM, Larry Martell wrote: > I have a list of dicts and one item of the dict is a date in m/d/Y > format. I want to sort by that. I tried this: > > sorted(data['trends'], key=lambda k: > datetime.strptime(k['date_time'],'%m/%d/%Y')) > > But that fails with: > > Exception

sorting a list of dicts by a computed field

2017-01-31 Thread Larry Martell
I have a list of dicts and one item of the dict is a date in m/d/Y format. I want to sort by that. I tried this: sorted(data['trends'], key=lambda k: datetime.strptime(k['date_time'],'%m/%d/%Y')) But that fails with: Exception Type: AttributeError at /report/CDSEM/WaferAlignment/ajax/waChart.jso

Python3.6 tkinter bug?

2017-01-31 Thread George Trojan - NOAA Federal
The following program behaves differently under Python 3.6: ''' checkbutton test ''' import tkinter class GUI(tkinter.Tk): def __init__(self): tkinter.Tk.__init__(self) frame = tkinter.Frame(self) for tag in ('A', 'B'): w = tkinter.Checkbutton(frame, text=

Re: What are your opinions on .NET Core vs Python?

2017-01-31 Thread Ian Kelly
On Jan 30, 2017 8:00 PM, "Michael Torrie" wrote: > In any case, partial classes seems like a misfeature of C# to me but > apparently they are used when making Windows Forms GUI-based apps. > Apparently VS autogenerates the class that backs the form, and then the > developer creates a partial class

Re: What are your opinions on .NET Core vs Python?

2017-01-31 Thread Ian Kelly
On Jan 30, 2017 11:32 PM, "Gregory Ewing" wrote: > That's the thing I find most frustrating about both C# and Java, > the lack of anything like Python's "from ... import ...". You get > a choice of either effectively doing "import *" on the contents > of a whole class and polluting your namespace,

PyDev 5.5.0 Released

2017-01-31 Thread Fabio Zadrozny
PyDev 5.5.0 Release Highlights --- * **Important** PyDev now requires Java 8 and Eclipse 4.6 (Neon) onwards. * PyDev 5.2.0 is the last release supporting Eclipse 4.5 (Mars). * If you enjoy PyDev, you can help in keeping it supported through its Patreon crowdfundin

Re: What are your opinions on .NET Core vs Python?

2017-01-31 Thread Michael Torrie
On 01/30/2017 10:31 PM, Gregory Ewing wrote: > Michael Torrie wrote: >> He was saying that you can >> use the explicit self paradigm in C#. Simply prefix each member variable >> with "this." > > One can do that in one's own code, but it doesn't help > you to read the code of someone else who hasn'

Re: command line micro wiki written in Python

2017-01-31 Thread Ethan Furman
On 01/31/2017 02:33 AM, Paul Wolf wrote: I've created a command line utility for managing text files. It's written in Python... That sounds really cool! -- ~Ethan~ -- https://mail.python.org/mailman/listinfo/python-list

Re: update a list element using an element in another list

2017-01-31 Thread Rhodri James
On 31/01/17 11:28, Daiyue Weng wrote: Hi, I am trying to update a list of dictionaries using another list of dictionaries correspondingly. In that, for example, # the list of dicts that need to be updated dicts_1 = [{'dict_1': '1'}, {'dict_2': '2'}, {'dict_3': '3'}] # dict used to update dicts

Re: update a list element using an element in another list

2017-01-31 Thread Jussi Piitulainen
Daiyue Weng writes: > Hi, I am trying to update a list of dictionaries using another list of > dictionaries correspondingly. In that, for example, > > # the list of dicts that need to be updated > dicts_1 = [{'dict_1': '1'}, {'dict_2': '2'}, {'dict_3': '3'}] > > # dict used to update dicts_1 > up

update a list element using an element in another list

2017-01-31 Thread Daiyue Weng
Hi, I am trying to update a list of dictionaries using another list of dictionaries correspondingly. In that, for example, # the list of dicts that need to be updated dicts_1 = [{'dict_1': '1'}, {'dict_2': '2'}, {'dict_3': '3'}] # dict used to update dicts_1 update_dicts = [{'dict_1': '1_1'}, {'

command line micro wiki written in Python

2017-01-31 Thread Paul Wolf
I've created a command line utility for managing text files. It's written in Python: https://github.com/paul-wolf/yewdoc-client It makes heavy use of the fantastic Click module by Armin Ronacher: http://click.pocoo.org/5/ This can be thought of in different ways: * A micro-wiki * A note-ta

Re: What library/package to use for parsing XML?

2017-01-31 Thread Chris Green
Irmen de Jong wrote: > On 30-1-2017 18:58, Chris Green wrote: > > I want to parse some XML data, it's the address book data from the > > linux program osmo. The file I want to parse is like this:- > > > > [snip] > > > > > I basically want to be able to extract the data and output in other > >