Re: Signals and Threads in Python 3.5 or so

2016-10-10 Thread dieter
Dan Stromberg writes: > I have a program http://stromberg.dnsalias.org/~dstromberg/looper/ > that I use and maintain. > > It's like GNU parallel or similar - yet another "run n processes, m at > a time" implementation. Interestingly, I've only used/tested it on > Linux, but it's under a Microsoft

Re: Solid Approach For Creating A Desktop Application

2016-10-10 Thread Mark Summerfield
On Monday, October 10, 2016 at 5:53:37 AM UTC+1, Mahan Marwat wrote: > I want to know what will be your approach creating a solid/reliable > application in Python? > i.e > 1. Which GUI framework will you use i.e PyQT or what? (will you make it work > removing the window default border) > 2. What

Re: Python-based monads essay (Re: Assignment versus binding)

2016-10-10 Thread Paul Rubin
Gregory Ewing writes: > Oh, undoubtedly. I just don't think it helps understand how burritos > are used in prog... er, that is, how monads... well, you know what I > mean. How about in math? https://www.cs.cmu.edu/~edmo/silliness/burrito_monads.pdf ;-) -- https://mail.python.org/mailman/lis

Re: Python-based monads essay (Re: Assignment versus binding)

2016-10-10 Thread Paul Rubin
Paul Rubin writes: >https://www.cs.cmu.edu/~edmo/silliness/burrito_monads.pdf Whoops, url changed: http://emorehouse.web.wesleyan.edu/silliness/burrito_monads.pdf -- https://mail.python.org/mailman/listinfo/python-list

Re: how to refactor nested for loop into smaller for loop assume each of them independent?

2016-10-10 Thread Ho Yeung Lee
I updated the code in msdn forum, I calculated from the end of file Discover file 4550 takes a long time to run, Assume it runs a whole day a file, 4550 days I guess need 12 years to finish full combination if only run at home. Hope Python sympy can be faster than cmaple in Amazon instance --

Is there a free graph library to show program flow by tranverse AST tree

2016-10-10 Thread Ho Yeung Lee
can this graph library handle recursive function call this symbol If it recursive call a function 3 times then in the inner loop call another function , can this graph library Show this relationship I find video that viv can show this program flow. -- https://mail.python.org/mailman/listinfo/py

Re: segfault using shutil.make_archive

2016-10-10 Thread Tim
On Friday, October 7, 2016 at 1:05:43 PM UTC-4, Michael Torrie wrote: > On 10/06/2016 10:46 AM, Tim wrote: > > I need to zip up a directory that's about 400mb. > > I'm using shutil.make_archive and I'm getting this response: > > > > Segmentation fault: 11 (core dumped) > > > > The code is str

Deviding N(1,2,3,..,N) part from numeric list as summation of each values(don't sorted) has highest possible.

2016-10-10 Thread Nune9
Deviding N(1,2,3,..,N) part from numeric list as summation of each values(don't sorted) has highest possible. The first I'm sorry for my English language. I have a list is land = [10,20,30,40,110,50,18,32,5] and I want to find each values of summation (don't sorted values in list) as It has h

PyQT - Signals and Slots?

2016-10-10 Thread Veek M
I'm reading Rapid GUI Programming - Mark Summerfield with Python and QT pg 131. Basically the mechanism is an event table which maps a 'signal' to a 'function/slot' -correct? self.connect(dial, SIGNAL("valueChanged(int)"), spinbox.setValue) Here, dial.valueChanged -> spinbox.setValue s.conn

Deviding N(1,2,3,..,N) part from numeric list as summation of each values(don't sorted) has highest as possible.

2016-10-10 Thread amornsak . nak
Deviding N(1,2,3,..,N) part from numeric list as summation of each values(don't sorted) has highest as possible. The first I'm sorry for my English language. I have a list is land = [10,20,30,40,110,50,18,32,5] and I want to find each values of summation (don't sorted values in list) as It ha

Deviding N(1,2,3,..,N) part from numeric list as summation of each values(don't sorted) has highest as possible.

2016-10-10 Thread Nuen9
Deviding N(1,2,3,..,N) part from numeric list as summation of each values(don't sorted) has highest as possible. The first I'm sorry for my English language. I have a list is land = [10,20,30,40,110,50,18,32,5] and I want to find each values of summation (don't sorted values in list) as It ha

Re: Deviding N(1, 2, 3, .., N) part from numeric list as summation of each values(don't sorted) has highest possible.

2016-10-10 Thread Ben Bacarisse
Nune9 writes: > I have a list is > > land = [10,20,30,40,110,50,18,32,5] > > and I want to find each values of summation (don't sorted values in > list) as It has highest possible > > example. > > I want to dividing N=3 part from list as above and divieded each part > has highest values that as p

How to process syntax errors

2016-10-10 Thread mr . puneet . goyal
Hi Is there any way to capture syntax errors and process them ? I want to write a function which calls every time whenever there is syntax error in the program. For example, inside example.py I just mention below line Obj = myClass() Obj xyz Obj is instance of a class. But there is synt

Re: Function to take the minimum of 3 numbers

2016-10-10 Thread Steve D'Aprano
On Mon, 10 Oct 2016 10:56 am, Ian Kelly wrote: > On Oct 9, 2016 2:57 PM, alleged: > The Pythonic way > > if b >= a <= c: > ... I doubt that would be considered Pythonic by many people. Chained comparisons are Pythonic, but not legal but weird combinations like `a == b < c is not d >= e <=

Re: Deviding N(1, 2, 3, .., N) part from numeric list as summation of each values(don't sorted) has highest as possible.

2016-10-10 Thread Steve D'Aprano
On Tue, 11 Oct 2016 12:38 am, amornsak@gmail.com wrote: > I have a list is > > land = [10,20,30,40,110,50,18,32,5] > > and I want to find each values of summation (don't sorted values in list) > as It has highest as possible > > example. > > I want to dividing N=3 part from list as above a

Re: PyQT - Signals and Slots?

2016-10-10 Thread Mark Summerfield
The ZeroSpinBox is a tiny example designed to show how the signal/slot mechanism works. It is just a QSpinBox with the addition of remembering how many times (all the) ZeroSpinBox(es) have had a 0 value. Nowadays the connections would be made with a new improved syntax: self.connect(self, SIGNAL

Newbie Need Help On Regex!

2016-10-10 Thread infosecflag
Hey guys! I am new to learning regex in python and I'm wondering how do I use regex in python to store the integers(positive and negative) i want into a list! For e.g. This is the data in a list. [u'\x1b[0m[\x1b[1m\x1b[0m\xbb\x1b[0m\x1b[36m]\x1b[0m (A=-5,B=5)', u'\x1b[0m[\x1b[1m\x1b[0m\xb

Newbie Need Help On Regex!

2016-10-10 Thread infosecflag
Hey guys! I am new to learning regex in python and I'm wondering how do I use regex in python to store the integers(positive and negative) i want into a list! For e.g. This is the data in a list. [u'\x1b[0m[\x1b[1m\x1b[0m\xbb\x1b[0m\x1b[36m]\x1b[0m (A=-5,B=5)', u'\x1b[0m[\x1b[1m\x1b[0m\xb

Re: Deviding N(1,2,3,..,N) part from numeric list as summation of each values(don't sorted) has highest as possible.

2016-10-10 Thread Nuen9
เมื่อ วันจันทร์ที่ 10 ตุลาคม ค.ศ. 2016 21 นาฬิกา 31 นาที 25 วินาที UTC+7, Steve D'Aprano เขียนว่า: > On Tue, 11 Oct 2016 12:38 am, amornsak@gmail.com wrote: > > > I have a list is > > > > land = [10,20,30,40,110,50,18,32,5] > > > > and I want to find each values of summation (don't sorted v

Re: How to process syntax errors

2016-10-10 Thread Chris Angelico
On Tue, Oct 11, 2016 at 1:13 AM, wrote: > Is there any way to capture syntax errors and process them ? I want to write > a function which calls every time whenever there is syntax error in the > program. > > For example, > > inside example.py > > I just mention below line > > > Obj = myClass()

Re: How to process syntax errors

2016-10-10 Thread Pierre-Alain Dorange
Chris Angelico wrote: > Yes and no. Syntax errors are detected when the script is compiled, so > you can't do something like this: You're right, except that Python is never compiled, it was just checked for syntax error before interpreting code. > > However, you can catch this at some form of

Re: Deviding N(1,2,3,..,N) part from numeric list as summation of each values(don't sorted) has highest as possible.

2016-10-10 Thread K. Elo
Hi! Could it be, "Nuen9", that you would like to find a split where the split sums are close to each other? In other words, you define the number of splits (in your example: 3) and the algortihm should test all possible combinations and select the split where the sum differences are smallest.

Re: PyQT - Signals and Slots?

2016-10-10 Thread Veek M
Mark Summerfield wrote: > > The ZeroSpinBox is a tiny example designed to show how the signal/slot > mechanism works. It is just a QSpinBox with the addition of > remembering how many times (all the) ZeroSpinBox(es) have had a 0 > value. > > Nowadays the connections would be made with a new impr

Re: How to process syntax errors

2016-10-10 Thread Chris Angelico
On Tue, Oct 11, 2016 at 2:44 AM, Pierre-Alain Dorange wrote: > Chris Angelico wrote: > >> Yes and no. Syntax errors are detected when the script is compiled, so >> you can't do something like this: > > You're right, except that Python is never compiled, it was just checked > for syntax error befo

Re: Deviding N(1,2,3,..,N) part from numeric list as summation of each values(don't sorted) has highest as possible.

2016-10-10 Thread Nuen9
เมื่อ วันจันทร์ที่ 10 ตุลาคม ค.ศ. 2016 22 นาฬิกา 46 นาที 33 วินาที UTC+7, K. Elo เขียนว่า: > Hi! > > Could it be, "Nuen9", that you would like to find a split where the > split sums are close to each other? In other words, you define the > number of splits (in your example: 3) and the algortihm

Re: PyQT - Signals and Slots?

2016-10-10 Thread Michael Torrie
On 10/10/2016 07:32 AM, Veek M wrote: > Whaaa...t?? Could someone explain what exactly is his grand design > besides being awfully circuitous? So he has some other Form thingy.. and > in that he sets up another mapping from ZeroSpinBox.atzero --> > ZeroSpinBox.announce where's announce and

Re: Deviding N(1,2,3,..,N) part from numeric list as summation of each values(don't sorted) has highest as possible.

2016-10-10 Thread Nuen9
> Hi! > > Could it be, "Nuen9", that you would like to find a split where the > split sums are close to each other? In other words, you define the > number of splits (in your example: 3) and the algortihm should test all > possible combinations and select the split where the sum differences are

Re: Deviding N(1,2,3,..,N) part from numeric list as summation of each values(don't sorted) has highest as possible.

2016-10-10 Thread Emile van Sebille
On 10/10/2016 09:25 AM, Nuen9 wrote: Hi! Could it be, "Nuen9", that you would like to find a split where the split sums are close to each other? In other words, you define the number of splits (in your example: 3) and the algortihm should test all possible combinations and select the split where

Re: Deviding N(1,2,3,..,N) part from numeric list as summation of each values(don't sorted) has highest as possible.

2016-10-10 Thread K. Elo
Hi! Here one possible solution: --- snip --- land = [10,20,30,40,110,50,18,32,5] landlength=len(land) winnersplit=[] for i in range(landlength-2): for j in range(landlength-1-i): splitsums=[sum(land[0:(i+1)]), sum(land[(i+1):(i+j+2)]), sum(land[(i+j+2):landlength])] differences

Re: How to process syntax errors

2016-10-10 Thread BartC
On 10/10/2016 16:44, Pierre-Alain Dorange wrote: Chris Angelico wrote: Yes and no. Syntax errors are detected when the script is compiled, so you can't do something like this: You're right, except that Python is never compiled, it was just checked for syntax error before interpreting code.

Re: Newbie Need Help On Regex!

2016-10-10 Thread breamoreboy
On Monday, October 10, 2016 at 3:58:56 PM UTC+1, infos...@gmail.com wrote: > Hey guys! > > I am new to learning regex in python and I'm wondering how do I use regex in > python to store the integers(positive and negative) i want into a list! > > For e.g. > > This is the data in a list. > >

Re: How to process syntax errors

2016-10-10 Thread breamoreboy
On Monday, October 10, 2016 at 3:15:40 PM UTC+1, mr.pune...@gmail.com wrote: > Hi > > Is there any way to capture syntax errors and process them ? I want to write > a function which calls every time whenever there is syntax error in the > program. > > For example, > > inside example.py > >

Re: Deviding N(1,2,3,..,N) part from numeric list as summation of each values(don't sorted) has highest as possible.

2016-10-10 Thread breamoreboy
On Monday, October 10, 2016 at 5:25:46 PM UTC+1, Nuen9 wrote: > > Hi! > > > > Could it be, "Nuen9", that you would like to find a split where the > > split sums are close to each other? In other words, you define the > > number of splits (in your example: 3) and the algortihm should test all >

Free Python e-books from O'Reilly

2016-10-10 Thread Martin Schöön
http://www.oreilly.com/programming/free/ Any of these good enough to bother getting? Yes, I know, they are for no pay but if not worth reading still a waste of time and memory space. /Martin -- https://mail.python.org/mailman/listinfo/python-list

Raster top and lowe x,y how ca i get

2016-10-10 Thread Xristos Xristoou
How can i get left lower X,Y left top X,Y right lower X,Y and right Top X,Y from a raster image like dem(digital elevation model). I am nembie sorry if i have stupid quest -- https://mail.python.org/mailman/listinfo/python-list

Re: Free Python e-books from O'Reilly

2016-10-10 Thread Uri Even-Chen
I think it's good that so many free books are about Python, more than any other specific programming language. But I haven't read any of them yet. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/

[RELEASE] Python 3.6.0b2 is now available

2016-10-10 Thread Ned Deily
On behalf of the Python development community and the Python 3.6 release team, I'm happy to announce the availability of Python 3.6.0b2. 3.6.0b2 is the second of four planned beta releases of Python 3.6, the next major release of Python, and marks the end of the feature development phase for 3.6.

Re: Free Python e-books from O'Reilly

2016-10-10 Thread John Gordon
In Martin =?UTF-8?Q?Sch=C3=B6=C3=B6n?= writes: > http://www.oreilly.com/programming/free/ > Any of these good enough to bother getting? Yes, I know, they > are for no pay but if not worth reading still a waste of time > and memory space. I downloaded several of them and noticed that they were

Re: How to process syntax errors

2016-10-10 Thread Terry Reedy
On 10/10/2016 11:24 AM, Chris Angelico wrote: On Tue, Oct 11, 2016 at 1:13 AM, wrote: Is there any way to capture syntax errors and process them ? I want to write a function which calls every time whenever there is syntax error in the program. However, you can catch this at some form of ou