Re: PyQt5: is the wrapper incomplete?

2016-06-16 Thread Vincent Vande Vyvre
Le 16/06/2016 04:54, jlada...@itu.edu a écrit : I am developing a data acquisition system for a custom device that communicates over USB. On the host computer side, I am using PyQt5.4. My Linux box has both Qt4 and Qt5 installed on it. I assume that PyQt5.4 compiled on top of Qt5 automatica

Re: PyQt5: is the wrapper incomplete?

2016-06-16 Thread Mark Summerfield
On Thursday, June 16, 2016 at 3:54:53 AM UTC+1, jlad...@itu.edu wrote: > I am developing a data acquisition system for a custom device that > communicates over USB. On the host computer side, I am using PyQt5.4. My > Linux box has both Qt4 and Qt5 installed on it. I assume that PyQt5.4 > comp

Re: PyQt5: is the wrapper incomplete?

2016-06-16 Thread Mark Summerfield
On Thursday, June 16, 2016 at 8:22:33 AM UTC+1, Mark Summerfield wrote: > On Thursday, June 16, 2016 at 3:54:53 AM UTC+1, jlad...@itu.edu wrote: > > I am developing a data acquisition system for a custom device that > > communicates over USB. On the host computer side, I am using PyQt5.4. My >

Re: What is structured programming (was for/while else doesn't make sense)

2016-06-16 Thread Lawrence D’Oliveiro
On Thursday, June 16, 2016 at 5:48:48 PM UTC+12, Rustom Mody wrote: > On Thursday, June 16, 2016 at 8:25:10 AM UTC+5:30, Lawrence D’Oliveiro wrote: > So here is the formal definition I remember from decades ago: > > A structured flow-graph is one that has a single point of entry and exit. > And is

is there a concurrent list for append in parallel programming in python? how to pass parameter in this parallel program with pool?

2016-06-16 Thread meInvent bbird
is there like c# have concurrent list ? i find something these, but how can it pass an initlist list variable is it doing the same function as itertools.combinations ? def comb(n, initlist): # the argument n is the number of items to select res = list(itertools.combinations(initlist, n))

mod_python compilation error

2016-06-16 Thread asimkon
Regarding my blog post , i would like to inform you that someone helped me to overcome this error but i got another one that i do not know it's meaning: error: [Errno 22] invalid mode ('wb') or filename: "dist\\mod_python-'{' \x9b\x9 c\xa4 \x9

python 3 + milter

2016-06-16 Thread Nagy László Zsolt
Does anyone know a module that can be used to write a before-queue, smtpd time milter with Python 3? Unfortunately, pymilter does not work with Python 3: Downloading https://pypi.python.org/packages/58/2f/d4799c9cade461177955ca19ade6ca55385286f066c0db9a0770a332ab8a/pymilter-1.0.tar.gz#md5=ec9b95f

Re: is there a concurrent list for append in parallel programming in python? how to pass parameter in this parallel program with pool?

2016-06-16 Thread Steven D'Aprano
On Thursday 16 June 2016 17:28, meInvent bbird wrote: > is there like c# have concurrent list ? What is a concurrent list? Can you link to the C# documentation for this? To me, "concurrent" describes a style of execution flow, and "list" describes a data structure. I am struggling to understan

Multiline parsing of python compiler demistification needed

2016-06-16 Thread Yubin Ruan
Hi, everyone, I have some problem understand the rule which the python compiler use to parsing the multiline string. Consider this snippet: str_1 = "foo" str_2 = "bar" print "A test case" + \ "str_1[%s] " + \ "str_2[%s] " % (str_1, str_2) Why would the snippet above give me an "T

Re: Python 3.6.0a2 is now available

2016-06-16 Thread Steven D'Aprano
On Thursday 16 June 2016 14:36, Lawrence D’Oliveiro wrote: > On Thursday, June 16, 2016 at 2:19:33 AM UTC+12, MRAB wrote: > >> Coincidentally, there was recently a discussion on the python-dev list >> about whether to switch to C99. > > Only slightly less than a generation after it came out...

Re: is there a concurrent list for append in parallel programming in python? how to pass parameter in this parallel program with pool?

2016-06-16 Thread meInvent bbird
the name in c# is not called concurrent list, it is called blockingcollection dictionary called concurrent dictionary thread safe these kind of things https://msdn.microsoft.com/en-us/library/dd267312(v=vs.110).aspx https://msdn.microsoft.com/en-us/library/dd997369(v=vs.110).aspx https://msdn.

Re: is there a concurrent list for append in parallel programming in python? how to pass parameter in this parallel program with pool?

2016-06-16 Thread meInvent bbird
how can list be synchronized when multiprocessor working in it? will one thread updating non-updated version, but another processor updating the version? On Thursday, June 16, 2016 at 4:30:33 PM UTC+8, Steven D'Aprano wrote: > On Thursday 16 June 2016 17:28, meInvent bbird wrote: > > > is there

Re: Multiline parsing of python compiler demistification needed

2016-06-16 Thread Peter Otten
Yubin Ruan wrote: > Hi, everyone, I have some problem understand the rule which the python > compiler use to parsing the multiline string. > > Consider this snippet: > > str_1 = "foo" > str_2 = "bar" > > print "A test case" + \ >"str_1[%s] " + \ >"str_2[%s] " % (str_1, str_2) >

Re: Multiline parsing of python compiler demistification needed

2016-06-16 Thread Jussi Piitulainen
Yubin Ruan writes: > Hi, everyone, I have some problem understand the rule which the python > compiler use to parsing the multiline string. > > Consider this snippet: > > str_1 = "foo" > str_2 = "bar" > > print "A test case" + \ >"str_1[%s] " + \ >"str_2[%s] " % (str_1, str_2) > >

Re: Multiline parsing of python compiler demistification needed

2016-06-16 Thread Frank Millman
"Yubin Ruan" wrote in message news:930753e3-4c9c-45e9-9117-d340c033a...@googlegroups.com... Hi, everyone, I have some problem understand the rule which the python compiler use to parsing the multiline string. Consider this snippet: str_1 = "foo" str_2 = "bar" print "A test case" + \

Re: What is structured programming (was for/while else doesn't make sense)

2016-06-16 Thread Rustom Mody
On Thursday, June 16, 2016 at 11:27:15 AM UTC+5:30, Lawrence D’Oliveiro wrote: > On Thursday, June 16, 2016 at 5:48:48 PM UTC+12, Rustom Mody wrote: > > On Thursday, June 16, 2016 at 8:25:10 AM UTC+5:30, Lawrence D’Oliveiro > > wrote: > > So here is the formal definition I remember from decades ag

Re: mod_python compilation error in VS 2008 for py2.7.1

2016-06-16 Thread asimkostas
Τη Τρίτη, 14 Ιουνίου 2016 - 3:36:23 μ.μ. UTC+3, ο χρήστης Pavel S έγραψε: > Have you considered to use rather WSGI-based solution? (for Apache Httpd is > mod_wsgi). Mod_python is totally obsolete. Regarding my blog post, i would like to inform you that someone helped me to overcome this error bu

Re: Bulk Adding Methods Pythonically

2016-06-16 Thread Julien Salort
Ethan Furman wrote: > If that is all correct, then, as Random suggested, move that loop into > the class body and use locals() [1] to update the class dictionary. > Just make sure and delete any temporary variables.[ [...] > [1] https://docs.python.org/3/library/functions.html#locals > Yes,

Re: Bulk Adding Methods Pythonically

2016-06-16 Thread Random832
On Wed, Jun 15, 2016, at 15:03, Ethan Furman wrote: > [1] https://docs.python.org/3/library/functions.html#locals > Yes, returning the class namespace is a language gaurantee. How do you get a guarantee from that text? I don't see any definition asserting that the "current local symbol table"

Re: Bulk Adding Methods Pythonically

2016-06-16 Thread Steven D'Aprano
On Fri, 17 Jun 2016 01:53 am, Julien Salort wrote: > Ethan Furman wrote: > >> If that is all correct, then, as Random suggested, move that loop into >> the class body and use locals() [1] to update the class dictionary. >> Just make sure and delete any temporary variables.[ > [...] >> [1] https:

Re: Bulk Adding Methods Pythonically

2016-06-16 Thread Ethan Furman
On 06/16, Random832 wrote: > On Wed, Jun 15, 2016, at 15:03, Ethan Furman wrote: >> [1] https://docs.python.org/3/library/functions.html#locals >> Yes, returning the class namespace is a language gaurantee. > > How do you get a guarantee from that text? Oops, my bad -- the gaurantee is in t

Contradictory error messages in Python 3.4 - standard library issue!

2016-06-16 Thread Harrison Chudleigh
While working on a program, I ran into an error with the usage of the module tokenize. The following message was displayed. File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tokenize.py", line 467, in tokenize encoding, consumed = detect_encoding(readline) File "/Library/

Re - Contradictory error messages in Python 3.4 - standard library issue!

2016-06-16 Thread Harrison Chudleigh
Sorry! I was trying to indent a line and accidentally sent only half of the message. As I was saying, I changed the line and reran the program. However, this produced another group of error messages. One was - File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tokenize.py", line

Re: Re - Contradictory error messages in Python 3.4 - standard library issue!

2016-06-16 Thread Ned Batchelder
On Thursday, June 16, 2016 at 6:39:27 PM UTC-4, Harrison Chudleigh wrote: > Sorry! I was trying to indent a line and accidentally sent only half of the > message. > > As I was saying, I changed the line and reran the program. However, this > produced another group of error messages. One was - > Fi

Re: Re - Contradictory error messages in Python 3.4 - standard library issue!

2016-06-16 Thread Matt Wheeler
On Thu, 16 Jun 2016, 23:31 Harrison Chudleigh, < harrison.chudlei...@education.nsw.gov.au> wrote: > Sorry! I was trying to indent a line and accidentally sent only half of the > message. > It would be helpful if your reply was actually a reply to your previous message, to enable us to follow the

Re: Contradictory error messages in Python 3.4 - standard library issue!

2016-06-16 Thread Steven D'Aprano
Hi Harrison, and welcome! On Fri, 17 Jun 2016 08:25 am, Harrison Chudleigh wrote: > While working on a program, I ran into an error with the usage of the > module tokenize. So you have an error with the use of tokenize. Fair enough. But why do you imagine that the errors lies in the module its

Re: Method Chaining

2016-06-16 Thread Steven D'Aprano
On Fri, 17 Jun 2016 12:02 pm, Lawrence D’Oliveiro wrote: > Some kinds of objects often receive a whole lot of method calls in > sequence. In these situations, it is handy if each method call ends with > “return self”, so that you can chain the calls together. This is > particularly common with gra

Re: What is structured programming (was for/while else doesn't make sense)

2016-06-16 Thread Lawrence D’Oliveiro
On Thursday, June 16, 2016 at 11:13:14 PM UTC+12, Rustom Mody wrote: > Please see https://en.wikipedia.org/wiki/Nassi%E2%80%93Shneiderman_diagram > > | Nassi–Shneiderman diagrams are (almost) isomorphic with > | flowcharts. Everything you can represent with a Nassi–Shneiderman > | diagram you can

Method Chaining

2016-06-16 Thread Lawrence D’Oliveiro
Some kinds of objects often receive a whole lot of method calls in sequence. In these situations, it is handy if each method call ends with “return self”, so that you can chain the calls together. This is particularly common with graphics APIs, for instance. Example from

Re: Method Chaining

2016-06-16 Thread Michael Selik
On Thu, Jun 16, 2016 at 10:53 PM Lawrence D’Oliveiro wrote: > Example from , > concisely expressing a complex drawing sequence: > > (g > .move_to((p1 + p2a) / 2) > .line_to(p1 + (p2 - p1) * frac) > .line_to((p1

Re: Tie dictionary to database table?

2016-06-16 Thread Lawrence D’Oliveiro
On Friday, June 10, 2016 at 12:30:47 AM UTC+12, Peter Heitzer wrote: > What I would like is if I write > > email['frank']='fr...@middle-of-nowhere.org' > > in my python script it generates a statement like > update users set email='fr...@middle-of-nowhere.org' where username='frank'; That’s not

Re: Method Chaining

2016-06-16 Thread Lawrence D’Oliveiro
On Friday, June 17, 2016 at 4:24:24 PM UTC+12, Michael Selik wrote: > On Thu, Jun 16, 2016 at 10:53 PM Lawrence D’Oliveiro wrote: > > > Example from , > > concisely expressing a complex drawing sequence: > > > > (g > > .move_to(