Re: Vowels [was Re: "monty" < "python"]

2013-03-20 Thread Larry Hudson
On 03/20/2013 09:28 PM, Steven D'Aprano wrote: On Wed, 20 Mar 2013 20:12:13 -0700, rusi wrote: "I did an horrible mistake" [...] is 'h' a vowel in french? This-language-lesson-was-brought-to-you-by-the-letters-thorn-wynn-and-ash- ly y'rs, As a point of totally irrelevant trivia... (And

Re: QT Inspired web development framework for python

2013-03-20 Thread timothy crosley
I really hope I'm not beating a dead horse, but I'm still really hoping for some feedback (good or bad) for this toolset/framework - as I really think it could help other Pyhton developers out. To that end I've added some demos on the main website showing how it works in action, that will hopefu

Re: Message passing syntax for objects

2013-03-20 Thread alex23
On Mar 20, 2:24 pm, Mark Janssen wrote: > Yes, that's the point I'm making, and it's significant because other > programmers can't see other's mental models. How does having API-less magic objects make this any better? I pass a string message to your RSS object: does it create XML from it? does i

Vowels [was Re: "monty" < "python"]

2013-03-20 Thread Steven D'Aprano
On Wed, 20 Mar 2013 20:12:13 -0700, rusi wrote: > "I did an horrible mistake" [...] is 'h' a vowel in french? No it is not, and writing "an horrible" is a trivial typo which can easily happen if you start thinking "an awful ..." (for example) and then change to "horrible". Been there, done that

Re: x += ... is not the same than x = x + ... if x is mutable

2013-03-20 Thread Nobody
On Wed, 20 Mar 2013 07:17:08 -0700, bartolome.sintes wrote: > I thought that x += ... was the same than x = x + ..., but today I have > realized it is not true when operating with mutable objects. It may or may not be the same. x += y will invoke x.__iadd__(y) if x has an __iadd__ method, otherwi

Re: "monty" < "python"

2013-03-20 Thread rusi
On Mar 21, 12:40 am, jmfauth wrote: > > > Courageous people can try to do something with the unicode > collation algorithm (see unicode.org). Some time ago, for the fun, > I wrote something (not perfect) with a reduced keys table (see > unicode.org), only a keys subset for some scripts hold i

Re: "monty" < "python"

2013-03-20 Thread Steven D'Aprano
On Wed, 20 Mar 2013 12:40:57 -0700, jmfauth wrote: > it [Python3.3] is no more unicode compliant I don't often call people a liar. I prefer to think that they are merely confused, or honestly hold a mistaken belief. But in this case, I will make an exception. JMF, I believe you are deliberatel

Re: "monty" < "python"

2013-03-20 Thread Michael Torrie
On 03/20/2013 01:40 PM, jmfauth wrote: > I forgot Py33 is now optimized for ascii user, it is no more > unicode compliant and I stupidely tested/sorted lists of French > words... Just because you keep saying it does not make it true. How is Py33 not unicode compliant anymore? And maybe you ought

Re: Top 10 python features

2013-03-20 Thread Mark Lawrence
On 20/03/2013 22:55, Albert Vonpupp wrote: On Sunday, March 17, 2013 10:18:16 AM UTC-3, Albert Vonpupp wrote: Hello pythonistas, I'm new to python and so far I'm really enjoying learning it. I would like to know what are the top 10 most important features (on your opinion) in python. I

Re: Top 10 python features

2013-03-20 Thread Albert Vonpupp
On Sunday, March 17, 2013 10:18:16 AM UTC-3, Albert Vonpupp wrote: > Hello pythonistas, > > > > I'm new to python and so far I'm really enjoying learning it. > > > > I would like to know what are the top 10 most important features (on your > opinion) in python. > > > > I have to prepare a

Re: "monty" < "python"

2013-03-20 Thread Tim Delaney
On 21 March 2013 06:40, jmfauth wrote: > > [snip usual rant from jmf] Franz, please pay no attention to jmf. He has become obsessed with a single small regression in Python 3.3 in performance with how strings perform in a very small domain that rarely shows up in practice (although as he h

Re: Lists and Decimal numbers

2013-03-20 Thread Alister
On Wed, 20 Mar 2013 20:00:38 +, Grant Edwards wrote: > On 2013-03-20, Alister wrote: > >> and a list comprehension would streamline things further >> >> t=[round(x*1.0/60),4 for x in range(1440)] #compatible with V2.7 & >> V3.0) > > There's a typo in the above. It should be: > > t = [rou

Re: Test a list

2013-03-20 Thread John Gordon
In <121be20a-c02a-4b0e-a86f-7c69597b9...@googlegroups.com> =?ISO-8859-1?Q?Ana_Dion=EDsio?= writes: > t= [3,5,6,7,10,14,17,21] > Basically I want to print Test 1 when i is equal to an element of the > list "t" and print Test 2 when i is not equal: > while i<=25: > if i==t[]: >pri

Re: Lists and Decimal numbers

2013-03-20 Thread Grant Edwards
On 2013-03-20, Alister wrote: > and a list comprehension would streamline things further > > t=[round(x*1.0/60),4 for x in range(1440)] #compatible with V2.7 & V3.0) There's a typo in the above. It should be: t = [round((x*1.0/60),4) for x in range(1440)] -- Grant Edwards gran

Re: Lists and Decimal numbers

2013-03-20 Thread Mark Lawrence
On 20/03/2013 19:20, Alister wrote: On Wed, 20 Mar 2013 16:52:00 +0100, Peter Otten wrote: Ana Dionísio wrote: So, I have this script that puts in a list every minute in 24 hours hour=[] i=0 t=-(1.0/60.0) while i<24*60: i = i+1 t = t+(1.0/60.0) hour.append([t]) In many cases you

Re: "monty" < "python"

2013-03-20 Thread jmfauth
Courageous people can try to do something with the unicode collation algorithm (see unicode.org). Some time ago, for the fun, I wrote something (not perfect) with a reduced keys table (see unicode.org), only a keys subset for some scripts hold in memory. It works with Py32 and Py33. In an at

Re: Lists and Decimal numbers

2013-03-20 Thread Alister
On Wed, 20 Mar 2013 16:52:00 +0100, Peter Otten wrote: > Ana Dionísio wrote: > >> So, I have this script that puts in a list every minute in 24 hours >> >> hour=[] >> i=0 t=-(1.0/60.0) >> while i<24*60: >> i = i+1 t = t+(1.0/60.0) >> hour.append([t]) > > In many cases you can write > >

SOAPpy.Types.faultType: Cannot use object of type stdClass as array

2013-03-20 Thread Tamer Higazi
Hi poeple! I wrote a small script, and I am not getting smartwhat is ment with this error message... Any ideas?! I got this error message: SOAPpy.Types.faultType: File "/storage/PyProjects/toolsAPP/KASUpdate.py", line 32, in KasObj = KASSystem() File "/storage/PyProjects/toolsAPP/KASUpdat

Re: join()

2013-03-20 Thread Steven D'Aprano
On Wed, 20 Mar 2013 10:54:22 -0500, Tim Chase wrote: > On 2013-03-20 14:39, Steven D'Aprano wrote: >> Then you join the list of words back >> into a single string, using the joint method. > > Sometimes when I see people make spelling errors, I wonder what they > were smoking. Sometimes, it's mor

Re: Test a list

2013-03-20 Thread Steven D'Aprano
On Wed, 20 Mar 2013 11:15:27 -0700, Ana Dionísio wrote: > t= [3,5,6,7,10,14,17,21] > > Basically I want to print Test 1 when i is equal to an element of the > list "t" and print Test 2 when i is not equal: Wouldn't it make more sense to print "Equal" and "Not equal"? If all you want to do is ch

Re: Test a list

2013-03-20 Thread Tim Chase
On 2013-03-20 11:15, Ana Dionísio wrote: > t= [3,5,6,7,10,14,17,21] > > Basically I want to print Test 1 when i is equal to an element of > the list "t" and print Test 2 when i is not equal: > > while i<=25: > if i==t[]: >print "Test1" > else: >print "Test2" > > What is m

Re: Test a list

2013-03-20 Thread Joel Goldstick
On Wed, Mar 20, 2013 at 2:15 PM, Ana Dionísio wrote: > > t= [3,5,6,7,10,14,17,21] > > Basically I want to print Test 1 when i is equal to an element of the list > "t" and print Test 2 when i is not equal: > > > while i<=25: > You test i, but you don't set i to anything, or change it in your loop

Re: Test a list

2013-03-20 Thread timothy crosley
Hi Ana, if I understand your question correctly, all you have to do to test this is to write: if i in t: print "Test1" else: print "Test2" On Wednesday, March 20, 2013 2:15:27 PM UTC-4, Ana Dionísio wrote: > t= [3,5,6,7,10,14,17,21] > > > > Basically I want to print Test 1 when i is e

Test a list

2013-03-20 Thread Ana Dionísio
t= [3,5,6,7,10,14,17,21] Basically I want to print Test 1 when i is equal to an element of the list "t" and print Test 2 when i is not equal: while i<=25: if i==t[]: print "Test1" else: print "Test2" What is missing here for this script work? Thank you all -- http:

Re: Python GUI questions

2013-03-20 Thread Rick Johnson
On Tuesday, March 19, 2013 10:21:06 PM UTC-5, Terry Reedy wrote: > On 3/19/2013 10:16 PM, Ranting Rick wrote: > > [snip code] > > when I run this, and click the button, I get: > >TypeError: cbButton() missing 1 required positional argument: 'self' > > ...when I remove 'self' from cbButton, I

Re: "monty" < "python"

2013-03-20 Thread Grant Edwards
On 2013-03-20, franzferdinand wrote: "Monty" < "Python" > True "Z" < "a" > True "Monty" < "Montague" > > False > What's the rule about that? I don't know what "that" refers to in your question, but 'a' comes before 'y' if that's what you're asking. > Is it the number of letters or

ANN: Python Meeting Düsseldorf -10.04.2013

2013-03-20 Thread eGenix Team: M.-A. Lemburg
[This announcement is in German since it targets a local user group meeting in Düsseldorf, Germany] ANKÜNDIGUNG Python Meeting Düsseldorf http://pyddf.de/ Ein Treffen v

Re: join()

2013-03-20 Thread Tim Chase
On 2013-03-20 14:39, Steven D'Aprano wrote: > Then you join the list of words back > into a single string, using the joint method. Sometimes when I see people make spelling errors, I wonder what they were smoking. Sometimes, it's more obvious... ;-) -tkc -- http://mail.python.org/mailman/list

Re: Lists and Decimal numbers

2013-03-20 Thread Peter Otten
Ana Dionísio wrote: > So, I have this script that puts in a list every minute in 24 hours > > hour=[] > i=0 > t=-(1.0/60.0) > while i<24*60: > i = i+1 > t = t+(1.0/60.0) > hour.append([t]) In many cases you can write for i in range(...): ... instead of incrementing manually. >

Re: Lists and Decimal numbers

2013-03-20 Thread Wanderer
On Wednesday, March 20, 2013 11:27:30 AM UTC-4, Ana Dionísio wrote: > So, I have this script that puts in a list every minute in 24 hours > > > > hour=[] > > i=0 > > t=-(1.0/60.0) > > while i<24*60: > > i = i+1 > > t = t+(1.0/60.0) > > hour.append([t]) > > > > When it is doi

Lists and Decimal numbers

2013-03-20 Thread Ana Dionísio
So, I have this script that puts in a list every minute in 24 hours hour=[] i=0 t=-(1.0/60.0) while i<24*60: i = i+1 t = t+(1.0/60.0) hour.append([t]) When it is doing the cicle it can have all the decimal numbers, but I need to print the result with only 4 decimal numbers How can I

Suppress PyDev warning for wx event variable

2013-03-20 Thread Wanderer
I have two versions of Eclipse on two different machines; Indigo and Juno. In Indigo, the wxPython event variable in the definitions is not flagged as an unused variable even though I don't use it in the method. In Juno I keep getting the warnings. The event variable is just there to bind the me

Re: join()

2013-03-20 Thread franzferdinand
Yeah it works. Thank you everybody! -- http://mail.python.org/mailman/listinfo/python-list

Re: join()

2013-03-20 Thread Mark Lawrence
On 20/03/2013 14:05, franzferdinand wrote: I'm doing this "Write code that removes whitespace at the beginning and end of a string, and normalizes whitespace between words to be a single space character" I can do it using split() raw = " the weather is sunny today

Re: join()

2013-03-20 Thread Steven D'Aprano
On Wed, 20 Mar 2013 07:05:04 -0700, franzferdinand wrote: > I'm doing this "Write code that removes whitespace at the beginning and > end of a string, and normalizes whitespace between words to be a single > space character" > > I can do it using split() > raw = " the weather is

Re: join()

2013-03-20 Thread Wolfgang Maier
franzferdinand hotmail.com> writes: > > I'm doing this "Write code that removes whitespace at the beginning > and end of a string, and normalizes whitespace between words to be a > single space character" > > I can do it using split() > > >>> raw = " the weather is sunny

Re: x += ... is not the same than x = x + ... if x is mutable

2013-03-20 Thread Jussi Piitulainen
bartolome.sin...@gmail.com writes: > Hi, > > I thought that x += ... was the same than x = x + ..., but today I > have realized it is not true when operating with mutable objects. > > In Python 3.3 or 2.7 IDLE (Windows) compare: > >>> a = [3] > >>> b = a > >>> a = a + [1] > >>> b > [3] > > and

Re: "monty" < "python"

2013-03-20 Thread Jan Oelze
Interesting. Thanks! On 20.03.2013, at 15:17, Ian Foote wrote: > On 20/03/13 13:38, Jan Oelze wrote: > >> "Strings are compared lexicographically using the numeric equivalents >> (the result of the built-in function ord()) of their characters. Unicode >> and 8-bit strings are fully interoperabl

Re: Excel column 256 limit

2013-03-20 Thread Neil Cerutti
On 2013-03-19, Ian Kelly wrote: > On Tue, Mar 19, 2013 at 8:44 AM, Tim Chase > wrote: >> On 2013-03-19 14:07, Neil Cerutti wrote: >>> On 2013-03-18, Ana Dion?sio wrote: >>> > But I still get the error and I use Excel 2010. >>> > >>> > I'm trying to export data in a list to Excel >>> >>> xlrd: Lib

x += ... is not the same than x = x + ... if x is mutable

2013-03-20 Thread bartolome . sintes
Hi, I thought that x += ... was the same than x = x + ..., but today I have realized it is not true when operating with mutable objects. In Python 3.3 or 2.7 IDLE (Windows) compare: >>> a = [3] >>> b = a >>> a = a + [1] >>> b [3] and >>> a = [3] >>> b = a >>> a += [1] >>> b [3, 1] Is this beha

Re: "monty" < "python"

2013-03-20 Thread Ian Foote
On 20/03/13 13:38, Jan Oelze wrote: "Strings are compared lexicographically using the numeric equivalents (the result of the built-in function ord()) of their characters. Unicode and 8-bit strings are fully interoperable in this behavior." This isn't true in python 3: Python 3.2.3 (default, O

join()

2013-03-20 Thread franzferdinand
I'm doing this "Write code that removes whitespace at the beginning and end of a string, and normalizes whitespace between words to be a single space character" I can do it using split() >>> raw = " the weather is sunny today " >>> raw.split() ['the', 'weather'

Re: "monty" < "python"

2013-03-20 Thread franzferdinand
Ok, thanks everybody! -- http://mail.python.org/mailman/listinfo/python-list

Re: "monty" < "python"

2013-03-20 Thread Roy Smith
In article , Jan Oelze wrote: > From the docs[0]: > > "Strings are compared lexicographically using the numeric equivalents (the > result of the built-in function ord()) of their characters. Unicode and 8-bit > strings are fully interoperable in this behavior." Note, however, that sorting or

best .lang. python

2013-03-20 Thread M.gowtham M.gowtham
Any ideas on what to do? Stop attempting to negotiate. Contact your state insurance commission. Be prepared to divulge the name of your insurer. Keep detailed records of all your contacts. - - gpsman website--> http://www.win2job.info/ -- http://mail.python.org/mailman/listinfo/

Re: "monty" < "python"

2013-03-20 Thread R. Michael Weylandt
It's lexigraphic (order by first letter, but if those are the same, compare the second, but if those are same compare the third, ... if one ends while the other continues, it's considered 'lower') on the character's ASCII (binary encoding values): http://www.asciitable.com/ Note that all the uppe

Re: "monty" < "python"

2013-03-20 Thread Jan Oelze
From the docs[0]: "Strings are compared lexicographically using the numeric equivalents (the result of the built-in function ord()) of their characters. Unicode and 8-bit strings are fully interoperable in this behavior." [0] http://docs.python.org/2/reference/expressions.html#not-in On 20.03.

"monty" < "python"

2013-03-20 Thread franzferdinand
>>> "Monty" < "Python" True >>> "Z" < "a" True >>> "Monty" < "Montague" False What's the rule about that? Is it the number of letters or what? thanks -- http://mail.python.org/mailman/listinfo/python-list

Multiple rows from MySQL query saved in an array structure

2013-03-20 Thread Norah Jones
I have this Python code: self.lock_tables("read", ['nets_permissions as n', 'devices_permissions as d']) usrs = self.db.get("SELECT n.user_id FROM nets_permissions as n \ left join devices_permissions as d \ on n.user_id = d.user_id \

Re: Help. HOW TO guide for PyQt installation

2013-03-20 Thread Phil Thompson
On Wed, 20 Mar 2013 03:29:35 -0700 (PDT), jmfauth wrote: > On 20 mar, 10:30, Phil Thompson wrote: >> On Wed, 20 Mar 2013 02:09:06 -0700 (PDT), jmfauth >> wrote: >> >> >> >> >> >> >> >> >> >> > On 20 mar, 01:12, "D. Xenakis" wrote: >> >> Hi there, >> >> Im searching for an installation guide for

Re: Help. HOW TO guide for PyQt installation

2013-03-20 Thread jmfauth
On 20 mar, 10:30, Phil Thompson wrote: > On Wed, 20 Mar 2013 02:09:06 -0700 (PDT), jmfauth > wrote: > > > > > > > > > > > On 20 mar, 01:12, "D. Xenakis" wrote: > >> Hi there, > >> Im searching for an installation guide for PyQt toolkit. > >> To be honest im very confused about what steps should

Re: Best way to find starting directory

2013-03-20 Thread Dave Angel
On 03/20/2013 05:38 AM, Frank Millman wrote: On 20/03/2013 10:56, Dave Angel wrote: On 03/20/2013 01:58 AM, Frank Millman wrote: On 19/03/2013 17:03, Dave Angel wrote: Dave, I really appreciate your input, but we are talking at cross purposes somewhere along the line - I am not sure whe

Re: link is unavailable http://mail.python.org/mailman/listinfo/python-list

2013-03-20 Thread Dave Angel
On 03/20/2013 05:40 AM, Bhavitha Nagaraju wrote: Hi all, The link for sendkeys, which is a pre-requiste for winGuipython is unavailable. http://mail.python.org/mailman/listinfo/python-list. Could you suggest , where I could get the sendKeys for now… Looks like you pasted the wrong link in

link is unavailable http://mail.python.org/mailman/listinfo/python-list

2013-03-20 Thread Bhavitha Nagaraju
Hi all, The link for sendkeys, which is a pre-requiste for winGuipython is unavailable. http://mail.python.org/mailman/listinfo/python-list. Could you suggest , where I could get the sendKeys for now… Thanking in advance. Bhavitha -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to find starting directory

2013-03-20 Thread Frank Millman
On 20/03/2013 10:56, Dave Angel wrote: On 03/20/2013 01:58 AM, Frank Millman wrote: On 19/03/2013 17:03, Dave Angel wrote: On 03/19/2013 10:29 AM, Frank Millman wrote: On 19/03/2013 14:46, Dave Angel wrote: In putting them there, you are making two assumptions. One is that only one user w

Re: Help. HOW TO guide for PyQt installation

2013-03-20 Thread Phil Thompson
On Wed, 20 Mar 2013 02:09:06 -0700 (PDT), jmfauth wrote: > On 20 mar, 01:12, "D. Xenakis" wrote: >> Hi there, >> Im searching for an installation guide for PyQt toolkit. >> To be honest im very confused about what steps should i follow for a >> complete and clean installation. Should i better cho

Re: Help. HOW TO guide for PyQt installation

2013-03-20 Thread jmfauth
On 20 mar, 01:12, "D. Xenakis" wrote: > Hi there, > Im searching for an installation guide for PyQt toolkit. > To be honest im very confused about what steps should i follow for a complete > and clean installation. Should i better choose to install the 32bit or the > 64bit windows version? Or ma

Re: Best way to find starting directory

2013-03-20 Thread Dave Angel
On 03/20/2013 01:58 AM, Frank Millman wrote: On 19/03/2013 17:03, Dave Angel wrote: On 03/19/2013 10:29 AM, Frank Millman wrote: On 19/03/2013 14:46, Dave Angel wrote: In putting them there, you are making two assumptions. One is that only one user will ever run this, and two is that the u

Re: CSV, lists, and functions

2013-03-20 Thread rusi
On Mar 20, 6:37 am, Roy Smith wrote: > > Another possibility is to use pandas (http://pandas.pydata.org/). Thanks for the link -- looks interesting! -- http://mail.python.org/mailman/listinfo/python-list

Re: Grouping on and exporting to csv files

2013-03-20 Thread Peter Otten
accessnew...@gmail.com wrote: > My current Test_Sort.csv looks like this (which constantly > changes-although never more than 4 records, thus far anyway): > > RecNo,Count,District,Fruit,StoreNo > 1,100,0,oranges,1254 > 2,30,3,apples,654 > 3,100,0,bananas,21 > 4,0,4,grapes,478 > > I wrote the fol