Re: Knapsack Problem Without Value

2013-12-14 Thread Steven D'Aprano
On Fri, 13 Dec 2013 01:38:47 -0800, geezle86 wrote: > On Friday, December 13, 2013 9:08:56 AM UTC+7, geez...@gmail.com wrote: >> Hi, >> >> I wanna ask about Knapsack. I do understand what Knapsack is about. But >> this one i faced is a different problem. There is no value. I mean, >> it's like thi

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-14 Thread Steven D'Aprano
On Fri, 13 Dec 2013 17:49:32 -0500, Terry Reedy wrote: > On 12/13/2013 11:15 AM, wxjmfa...@gmail.com wrote: >> Le jeudi 12 décembre 2013 18:55:15 UTC+1, Terry Reedy a écrit : > >>> If you mean cp65xxx (I forget exact numbers), MS Command Prompt fails, >>> not Python. One should not use any other

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-14 Thread Steven D'Aprano
On Fri, 13 Dec 2013 23:58:14 +, Mark Lawrence wrote: > On 13/12/2013 23:17, Ethan Furman wrote: >> On 12/13/2013 03:10 PM, Mark Lawrence wrote: >>> >>> Seems like we're now in the later stages of the 15, three minute >>> rounds. The trainer won't throw in the towel, the referee won't stop >>>

Re: accessing a page which request an openID authentication

2013-12-14 Thread Steven D'Aprano
On Fri, 13 Dec 2013 16:42:37 +, Denis McMahon wrote: > On Fri, 13 Dec 2013 02:32:49 -0800, uni.mail.2014 wrote: > >> I have a page that request an openID authentication > > And your Python question is? I thought the question was fairly obvious. How would you access a page using OpenID

GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-14 Thread Jai
GUI:-want to learn GUI programming in python , how should i proceed. There are lots of book here so I am confuse which book i should refer so that i don't waste time . please answer -- https://mail.python.org/mailman/listinfo/python-list

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-14 Thread Chris Angelico
On Sat, Dec 14, 2013 at 11:12 PM, Jai wrote: > GUI:-want to learn GUI programming in python , how should i proceed. > > There are lots of book here so I am confuse which book i should refer so > that i don't waste time . please answer There are many ways to build a GUI with Python. Some of th

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-14 Thread Jai
thank you sir -- https://mail.python.org/mailman/listinfo/python-list

Re: [newbie] trying socket as a replacement for nc

2013-12-14 Thread Jean Dubois
Op vrijdag 13 december 2013 18:09:50 UTC+1 schreef rusi: > On Friday, December 13, 2013 5:50:03 PM UTC+5:30, Jean Dubois wrote: > > to make the script check itself whether pyhon2 or python3 should be used? > As far as I know both (2 and 3) worked > Do you have some reason to suspect one works and o

Re: [newbie] trying socket as a replacement for nc

2013-12-14 Thread Jean Dubois
Op vrijdag 13 december 2013 09:35:18 UTC+1 schreef Mark Lawrence: > On 13/12/2013 03:23, Jean Dubois wrote: > > > > kind regards, > > jean > > p.s. I'm using Linux/Kubuntu 11.04 > > > Would you please read and action this > https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing the

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-14 Thread Mark Lawrence
On 14/12/2013 10:00, Steven D'Aprano wrote: On Fri, 13 Dec 2013 23:58:14 +, Mark Lawrence wrote: On 13/12/2013 23:17, Ethan Furman wrote: On 12/13/2013 03:10 PM, Mark Lawrence wrote: Seems like we're now in the later stages of the 15, three minute rounds. The trainer won't throw in the

Re: [newbie] trying socket as a replacement for nc

2013-12-14 Thread Mark Lawrence
On 14/12/2013 13:14, Jean Dubois wrote: Op vrijdag 13 december 2013 09:35:18 UTC+1 schreef Mark Lawrence: On 13/12/2013 03:23, Jean Dubois wrote: kind regards, jean p.s. I'm using Linux/Kubuntu 11.04 Would you please read and action this https://wiki.python.org/moin/GoogleGroupsPython to pre

Re: [newbie] trying socket as a replacement for nc

2013-12-14 Thread Jean Dubois
Op vrijdag 13 december 2013 16:35:31 UTC+1 schreef Jean-Michel Pichavant: > - Original Message - > > I have an ethernet-rs232 adapter which allows me to connect to a > > measurement instrument by means of netcat on a linux system. > > e.g. entering nc 10.128.59.63 7000 > > allows me to ente

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-14 Thread wxjmfauth
Le samedi 14 décembre 2013 00:30:38 UTC+1, Terry Reedy a écrit : > > > > > > What is not clear to me is whether Windows internally uses UCS-2, which > > only codes BMP chars, and which would *not* be excellent, or UTF-16, > > which covers all chars by using surrogates. I will guess the lat

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-14 Thread Chris Angelico
On Sun, Dec 15, 2013 at 1:03 AM, wrote: > D:\>chcp 65001 > Page de codes active : 65001 > D:\>echo "*" > "*" > D:\> > > locale.getdefaultlocale() > ('fr_CH', 'cp1252') > > -- > > In my understanding and experience, in the MS world > (desktop, intel), today: > Unicode == utf-16-le Yo

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-14 Thread Mark Lawrence
On 14/12/2013 14:15, Chris Angelico wrote: On Sun, Dec 15, 2013 at 1:03 AM, wrote: D:\>chcp 65001 Page de codes active : 65001 D:\>echo "*" "*" D:\> locale.getdefaultlocale() ('fr_CH', 'cp1252') -- In my understanding and experience, in the MS world (desktop, intel), today: Unico

Is it more CPU-efficient to read/write config file or read/write sqlite database?

2013-12-14 Thread JL
I have a number of python processes which communicate with each other through writing/reading config text files. The python ConfigParser is used. I am wondering if it is more CPU-efficient to switch to using sqlite database instead of using configuration files. If the software does plenty of re

Re: Is it more CPU-efficient to read/write config file or read/write sqlite database?

2013-12-14 Thread Irmen de Jong
On 14-12-2013 16:29, JL wrote: > I have a number of python processes which communicate with each other through > writing/reading config text files. The python ConfigParser is used. I am > wondering if > it is more CPU-efficient to switch to using sqlite database instead of using > configuration fi

Re: Using pythons smtp server

2013-12-14 Thread Irmen de Jong
On 14-12-2013 1:46, Dennis Lee Bieber wrote: > About then, I discovered the first two significant books on Python at > Computer Literacy, and that an Amiga binary was available (Python 1.4, I > think -- thanks, Irmin). You're welcome, but my name is spelled Irmen, with an 'e' ;-) Cheers Ir

Re: Is it more CPU-efficient to read/write config file or read/write sqlite database?

2013-12-14 Thread Tim Chase
On 2013-12-14 07:29, JL wrote: > I have a number of python processes which communicate with each > other through writing/reading config text files. The python > ConfigParser is used. I am wondering if it is more CPU-efficient to > switch to using sqlite database instead of using configuration > fil

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-14 Thread Wolfgang Keller
> GUI:-want to learn GUI programming in python , how should i proceed. > > There are lots of book here so I am confuse which book i should > refer so that i don't waste time . It depends on what you want to do with the GUI, since there are many different GUI frameworks for Python. E.g. If you

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-14 Thread rurpy
On 12/14/2013 05:25 AM, Chris Angelico wrote: > On Sat, Dec 14, 2013 at 11:12 PM, Jai wrote: >> GUI:-want to learn GUI programming in python , how should i proceed. >> >> There are lots of book here so I am confuse which book i should refer so >> that i don't waste time . please answer > > Th

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-14 Thread Mark Lawrence
On 14/12/2013 17:05, Wolfgang Keller wrote: wxWidgets (wxPython) recently (since 2.9/3.0) got support for Cocoa, it's native on the Mac. It's quite slim, but seems to be a "moving target" API-wise, since the developers are not shy from breaking compatibility. Is it compatible with Python 3 yet?

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-14 Thread Mark Lawrence
On 14/12/2013 17:42, ru...@yahoo.com wrote: On 12/14/2013 05:25 AM, Chris Angelico wrote: wxPython currently runs only with Python2, not Python3. There is a drag-and-drop form designer available for it but it is a commercial product that costs money. It also comes with a useable (once you get

CP65001 fails (was re: ...)

2013-12-14 Thread Terry Reedy
On 12/14/2013 9:03 AM, wxjmfa...@gmail.com wrote: D:\>chcp 65001 Page de codes active : 65001 D:\>echo "*" "*" Try pasting *your* original echo command: echo "ሴé€㑖Ѓ⌴*" To repeat, here is what I see: ''' C:\Users\Terry>echo "?‚*" "?‚*" C:\Users\Terry>chcp 65001 Active code page: 65001

collections Counter most_common method

2013-12-14 Thread Mark Lawrence
This method returns a list, the example from The Fine Docs being:- >>> Counter('abracadabra').most_common(3) [('a', 5), ('r', 2), ('b', 2)] With the trend in Python being more and more towards methods returning iterators, is there ever likely to be an imost_common method, or has this been sugg

Re: collections Counter most_common method

2013-12-14 Thread Roy Smith
In article , Mark Lawrence wrote: > This method returns a list, the example from The Fine Docs being:- > > >>> Counter('abracadabra').most_common(3) > [('a', 5), ('r', 2), ('b', 2)] > > With the trend in Python being more and more towards methods returning > iterators, is there ever likely t

Re: collections Counter most_common method

2013-12-14 Thread Peter Otten
Mark Lawrence wrote: > This method returns a list, the example from The Fine Docs being:- > > >>> Counter('abracadabra').most_common(3) > [('a', 5), ('r', 2), ('b', 2)] > > With the trend in Python being more and more towards methods returning > iterators, is there ever likely to be an imost_co

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-14 Thread Michael Torrie
On 12/14/2013 10:05 AM, Wolfgang Keller wrote: > Tkinter is a bit "special" to use since it's not just a library, but > uses some kind of RPC. It seems that "look and feel" have been greatly > improved lately. I know Tkinter originated with the Tcl/Tk language. With Tkinter in Python is it still

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-14 Thread Michael Torrie
On 12/14/2013 10:05 AM, Wolfgang Keller wrote: > PyQt looks native everywhere, but it might be a bit overweight, > depending on what you want to do and where your applications need to > run. > > And then there's the licensing issue, since PyQt, unlike Qt itself, is > not available under LGPL afaik

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-14 Thread Michael Torrie
On 12/14/2013 10:42 AM, ru...@yahoo.com wrote: > The other big, widely-used GUI toolkit is PyQt. It runs on > both Python2 and Python3. There is another version of it > called PySide which is API compatible with PyQt but has > different licensing terms. PyQt comes with a very good > drag-and-

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-14 Thread Ned Deily
In article <52acb936.3020...@gmail.com>, Michael Torrie wrote: > On 12/14/2013 10:05 AM, Wolfgang Keller wrote: > > Tkinter is a bit "special" to use since it's not just a library, but > > uses some kind of RPC. It seems that "look and feel" have been greatly > > improved lately. > I know Tkinter

Re: CP65001 fails (was re: ...)

2013-12-14 Thread wxjmfauth
Le samedi 14 décembre 2013 19:43:41 UTC+1, Terry Reedy a écrit : > On 12/14/2013 9:03 AM, wxjmfa...@gmail.com wrote: > > > > > D:\>chcp 65001 > > > Page de codes active : 65001 > > > D:\>echo "*" > > > "*" > > > > Try pasting *your* original echo command: echo "ሴé€㑖Ѓ⌴*" > > > > To repea

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-14 Thread Terry Reedy
On 12/14/2013 3:01 PM, Michael Torrie wrote: On 12/14/2013 10:05 AM, Wolfgang Keller wrote: Tkinter is a bit "special" to use since it's not just a library, but uses some kind of RPC. It seems that "look and feel" have been greatly improved lately. I know Tkinter originated with the Tcl/Tk lan

Re: CP65001 fails (was re: ...)

2013-12-14 Thread Mark Lawrence
On 14/12/2013 20:48, wxjmfa...@gmail.com wrote: print((os.linesep).join([unicodedata.name(c) for c in u])) ETHIOPIC SYLLABLE SEE LATIN SMALL LETTER E WITH ACUTE EURO SIGN CJK UNIFIED IDEOGRAPH-3456 CYRILLIC CAPITAL LETTER GJE COUNTERBORE ASTERISK - cp65001, font: Consolas D:\jm\jmgo>ech

Re: CP65001 fails (was re: ...)

2013-12-14 Thread Steven D'Aprano
On Sat, 14 Dec 2013 21:05:05 +, Mark Lawrence wrote: > On 14/12/2013 20:48, wxjmfa...@gmail.com wrote: >> > print((os.linesep).join([unicodedata.name(c) for c in u])) >> ETHIOPIC SYLLABLE SEE >> LATIN SMALL LETTER E WITH ACUTE >> EURO SIGN >> CJK UNIFIED IDEOGRAPH-3456 >> CYRILLIC CAPITAL

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-14 Thread Steven D'Aprano
On Sat, 14 Dec 2013 13:01:58 -0700, Michael Torrie wrote: > On 12/14/2013 10:05 AM, Wolfgang Keller wrote: >> Tkinter is a bit "special" to use since it's not just a library, but >> uses some kind of RPC. It seems that "look and feel" have been greatly >> improved lately. > > I know Tkinter origi

Re: CP65001 fails (was re: ...)

2013-12-14 Thread Mark Lawrence
On 14/12/2013 22:51, Steven D'Aprano wrote: On Sat, 14 Dec 2013 21:05:05 +, Mark Lawrence wrote: On 14/12/2013 20:48, wxjmfa...@gmail.com wrote: print((os.linesep).join([unicodedata.name(c) for c in u])) ETHIOPIC SYLLABLE SEE LATIN SMALL LETTER E WITH ACUTE EURO SIGN CJK UNIFIED IDEOGRA

a Python Static Analyzer

2013-12-14 Thread arie . lakeman
Hi, I thought it would be worth contributing some awareness of Yin Wang's PySonar2 Python static analyzer being open sourced, it's here https://github.com/yinwang0/pysonar2. I recently converted it from being implemented in Java to being implemented in Python - here https://github.com/ariejdl

Re: [newbie] trying socket as a replacement for nc

2013-12-14 Thread Dan Stromberg
On Sat, Dec 14, 2013 at 5:33 AM, Jean Dubois wrote: > Op vrijdag 13 december 2013 16:35:31 UTC+1 schreef Jean-Michel Pichavant: >> - Original Message - >> > I have an ethernet-rs232 adapter which allows me to connect to a >> > measurement instrument by means of netcat on a linux system. >>

Re: [newbie] trying socket as a replacement for nc

2013-12-14 Thread Dan Stromberg
On Fri, Dec 13, 2013 at 8:06 AM, Grant Edwards wrote: > On 2013-12-12, Dan Stromberg wrote: >> On Thu, Dec 12, 2013 at 6:16 AM, Grant Edwards >> wrote: >> Sockets reserve the right to split one socket.send() into multiple socket.recv()'s on the other end of the communication, or to ag

Re: a Python Static Analyzer

2013-12-14 Thread Dan Stromberg
On Sat, Dec 14, 2013 at 4:35 PM, wrote: > Hi, > > I thought it would be worth contributing some awareness of Yin Wang's > PySonar2 Python static analyzer being open sourced, it's here > https://github.com/yinwang0/pysonar2. I recently converted it from being > implemented in Java to being imp

Re: CP65001 fails (was re: ...)

2013-12-14 Thread Steven D'Aprano
On Sat, 14 Dec 2013 13:43:41 -0500, Terry Reedy wrote: > This was reported by Victor Stinner as part of > http://bugs.python.org/issue19914 > to explain how cp65001 causes behavior like this with Python's > interactive help() function (which more for paging on Windows). > > >>> help(str) > Not e

Re: a Python Static Analyzer

2013-12-14 Thread Chris Rebert
On Sat, Dec 14, 2013 at 5:31 PM, Dan Stromberg wrote: > Where does PySonar2 sit in the spectrum from pylint > (thorough/pedantic) to pyflakes (relaxed/few-false-positives)? > > I use pylint and pyflakes a lot, and I've heard that PyChecker sits in > between them on this axis. My impression is tha

Re: a Python Static Analyzer

2013-12-14 Thread Mark Lawrence
On 15/12/2013 02:36, Chris Rebert wrote: On Sat, Dec 14, 2013 at 5:31 PM, Dan Stromberg wrote: Where does PySonar2 sit in the spectrum from pylint (thorough/pedantic) to pyflakes (relaxed/few-false-positives)? I use pylint and pyflakes a lot, and I've heard that PyChecker sits in between them

Re: min max from tuples in list

2013-12-14 Thread Tim Roberts
Dennis Lee Bieber wrote: > >> >>Well "performant" is performant enough for the purposes of communicating >>on the python list I think :D > > Most probably could figure it out as being stylistically similar to >"conformant", which I believe IS used in English > >conformant => something that

Re: CP65001 fails (was re: ...)

2013-12-14 Thread rusi
On Sunday, December 15, 2013 4:21:08 AM UTC+5:30, Steven D'Aprano wrote: > Apart from annoying the bystanders, your repeated angry and abusive > screeds aimed at JMF in particular but others as well over minor > formatting issues is more disruptive than the issues you are complaining > about. I

New to Python, Help to get script working?

2013-12-14 Thread Mark
Hey guys, I found this website that has a script in order to increase numbers to a live viewing stream. Being new to python, I keep running into problems trying to get it to work. The original site is here, as he talks about how it works. It is the top article. http://www.ericzhang.me/ I have

Re: CP65001 fails (was re: ...)

2013-12-14 Thread Steven D'Aprano
On Sat, 14 Dec 2013 20:42:40 -0800, rusi wrote: > On Sunday, December 15, 2013 4:21:08 AM UTC+5:30, Steven D'Aprano wrote: >> Apart from annoying the bystanders, your repeated angry and abusive >> screeds aimed at JMF in particular but others as well over minor >> formatting issues is more disrupt

Re: New to Python, Help to get script working?

2013-12-14 Thread Steven D'Aprano
On Sat, 14 Dec 2013 20:51:59 -0800, Mark wrote: > Hey guys, I found this website that has a script in order to increase > numbers to a live viewing stream. Being new to python, I keep running > into problems trying to get it to work. > > The original site is here, as he talks about how it works.

Re: CP65001 fails (was re: ...)

2013-12-14 Thread Terry Reedy
On 12/14/2013 9:39 PM, Steven D'Aprano wrote: On Sat, 14 Dec 2013 13:43:41 -0500, Terry Reedy wrote: This was reported by Victor Stinner as part of http://bugs.python.org/issue19914 to explain how cp65001 causes behavior like this with Python's interactive help() function (which more for paging

Re: CP65001 fails (was re: ...)

2013-12-14 Thread Chris Angelico
On Sun, Dec 15, 2013 at 3:42 PM, rusi wrote: > To me all this GG complaining sounds like some elderly mom-pop-uncle > who weeps/coaxes/moans/pleads/grumbles/ about a fused light bulb, > rather than climbing on a stool and changing the bloody thing. No, it's like moaning about Foo Brand light bulb

Re: New to Python, Help to get script working?

2013-12-14 Thread Chris Angelico
On Sun, Dec 15, 2013 at 3:51 PM, Mark wrote: > I have successfully installed python 3.3 for windows, pip and livestreamer > that is needed for it to work. What I'm seeing in that script suggests that it actually needs Python 2.7, not 3.3. The best approach would be to make it work with Python 3,

Re: CP65001 fails (was re: ...)

2013-12-14 Thread rusi
On Sunday, December 15, 2013 10:30:12 AM UTC+5:30, Steven D'Aprano wrote: > I'm sorry, I was under the impression that Mark had done most of the > work. I hadn't realised that others had contributed most of the practical > advice. To be fair, I added the stuff to the wiki on Mark's prompting. Ea

Re: Eliminate "extra" variable

2013-12-14 Thread Igor Korot
Tim, On Sun, Dec 8, 2013 at 2:18 PM, Tim Chase wrote: > On 2013-12-08 12:58, Igor Korot wrote: >> Also, the data comes from either SQLite or mySQL and so to eliminate >> the difference between those engines dates are processed as strings >> and converted to dates for the calculation purposes only

Re: request for guidance

2013-12-14 Thread rusi
On Saturday, December 14, 2013 10:41:09 AM UTC+5:30, David Hutto wrote: > Don't get me wrong, I didn't mean reinventing the wheel is a bad > thing, just that once you get the hang of things, you need to > display some creativity in your work to set yourself apart from the > rest. > Nowadays, ever