Re: Movie (MPAA) ratings and Python?

2013-12-09 Thread Paul Scott
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/12/2013 08:40, Ben Finney wrote: > Dan Stromberg writes: > >> Is anyone using a module or database that gives Python 3.x access >> to MPAA ratings (EG G, PG, PG-13, etc.)? If you are already using IMDB you should have a look at http://imdbpy.s

Re: Movie (MPAA) ratings and Python?

2013-12-09 Thread Ben Finney
Dan Stromberg writes: > Is anyone using a module or database that gives Python 3.x access to MPAA > ratings (EG G, PG, PG-13, etc.)? What information would you want access to? Why would a library (rather than, say, a short set of strings) be needed? > I explored a few of the possibilities on Py

Re: interactive help on the base object

2013-12-09 Thread Roy Smith
In article <52a6af26$0$2829$c3e8da3$76491...@news.astraweb.com>, Steven D'Aprano wrote: > > What about whether the arrows should have solid heads, open heads, > > barbed heads, double-barbed heads, or circles (filled or open)? Surely > > you can't expect people to write decent programs when th

Re: interactive help on the base object

2013-12-09 Thread Steven D'Aprano
On Tue, 10 Dec 2013 00:31:15 -0500, Roy Smith wrote: > In article <5f7e3e2f-2f86-4a2b-bea5-6e70b6fc2...@googlegroups.com>, > rusi wrote: > >> On Tuesday, December 10, 2013 10:40:27 AM UTC+5:30, Steven D'Aprano >> wrote: >> > By the way, I'm curious. Why are discussions about object oriented >>

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

2013-12-09 Thread Chris Angelico
On Tue, Dec 10, 2013 at 4:25 PM, Gregory Ewing wrote: >> On Monday, December 9, 2013 5:53:41 PM UTC+5:30, Oscar Benjamin wrote: >> >>> 5) Learning to program "should be painful" and we should expect the >>> students to complain about it (someone actually said that!) but the >>> pain makes them bet

Re: interactive help on the base object

2013-12-09 Thread Chris Angelico
On Tue, Dec 10, 2013 at 4:27 PM, Alan Bawden wrote: > Chris Angelico writes: > >> On Mon, Dec 9, 2013 at 6:31 PM, Alan Bawden >> ... >> How does that work, exactly? How do you have a class inherit >> (ultimately) from itself, and how does that impact the component class >> list? > > How does it w

Re: interactive help on the base object

2013-12-09 Thread Roy Smith
In article <5f7e3e2f-2f86-4a2b-bea5-6e70b6fc2...@googlegroups.com>, rusi wrote: > On Tuesday, December 10, 2013 10:40:27 AM UTC+5:30, Steven D'Aprano wrote: > > By the way, I'm curious. Why are discussions about object oriented coding > > off-topic to Python? This is not a rhetorical question.

Re: interactive help on the base object

2013-12-09 Thread Alan Bawden
Chris Angelico writes: > How does that work, exactly? How do you have a class inherit > (ultimately) from itself, and how does that impact the component class > list? How does it work "exactly"? You're asking me about a feature I never made use of, in a system I have no source for, and that I ha

Movie (MPAA) ratings and Python?

2013-12-09 Thread Dan Stromberg
Is anyone using a module or database that gives Python 3.x access to MPAA ratings (EG G, PG, PG-13, etc.)? I explored a few of the possibilities on Pypi, a couple of web interfaces, and the IMDB flat text file with ratings and reasons for those ratings, but I've not been really impressed yet. The

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

2013-12-09 Thread Gregory Ewing
On Monday, December 9, 2013 5:53:41 PM UTC+5:30, Oscar Benjamin wrote: 5) Learning to program "should be painful" and we should expect the students to complain about it (someone actually said that!) but the pain makes them better programmers in the end. That's like saying that when teaching wo

Re: python programming help

2013-12-09 Thread Chris Angelico
On Tue, Dec 10, 2013 at 4:10 PM, wrote: >> Windows-only is hardly the norm. There's at least as much software >> that's Mac-only or Linux-only as Windows-only. > > As much Mac-only software as Windows-only? Possibly, but I doubt > it although I acknowledge things are moving in that direction. > A

Re: interactive help on the base object

2013-12-09 Thread rusi
On Tuesday, December 10, 2013 10:40:27 AM UTC+5:30, Steven D'Aprano wrote: > By the way, I'm curious. Why are discussions about object oriented coding > off-topic to Python? This is not a rhetorical question. Well OOP on the python list is certainly on topic. Interminable discussions about why r

Re: python programming help

2013-12-09 Thread rurpy
On 12/08/2013 10:20 PM, rusi wrote: > On Monday, December 9, 2013 10:37:38 AM UTC+5:30, ru...@yahoo.com wrote: >[...] >> However it does not change the fact that people here have responded >> in rather extreme way to GG posts including calling GG users "twits" >> and claiming GG posts damage their

Re: interactive help on the base object

2013-12-09 Thread Steven D'Aprano
On Mon, 09 Dec 2013 20:32:06 -0800, rusi wrote: > On Tuesday, December 10, 2013 8:49:46 AM UTC+5:30, Steven D'Aprano > wrote: >> On Mon, 09 Dec 2013 05:59:29 -0500, Ned Batchelder wrote: > >> [...] >> > And the cycle continues: >> [...] > >> > Maybe we could just not? > > Thanks Ned for your at

Re: python programming help

2013-12-09 Thread rurpy
On 12/09/2013 01:15 AM, Chris Angelico wrote: > On Mon, Dec 9, 2013 at 4:10 PM, wrote: >> We all use buggy software every day. *Every* piece of non-trival >> software is buggy -- you already know that. So you are saying >> that bugs that annoy *you* are ones that *others* should change >> their

Re: python programming help

2013-12-09 Thread rurpy
On 12/09/2013 12:57 AM, Chris Angelico wrote: > On Mon, Dec 9, 2013 at 4:07 PM, wrote: >> However it does not change the fact that people here have responded >> in rather extreme way to GG posts including calling GG users "twits" >> and claiming GG posts damage their eyesight, as well as repeated

Re: interactive help on the base object

2013-12-09 Thread rusi
On Tuesday, December 10, 2013 8:49:46 AM UTC+5:30, Steven D'Aprano wrote: > On Mon, 09 Dec 2013 05:59:29 -0500, Ned Batchelder wrote: > [...] > > And the cycle continues: > [...] > > Maybe we could just not? Thanks Ned for your attempts at bringing some order and sense in these parts of the univ

Re: One liners

2013-12-09 Thread Steven D'Aprano
On Fri, 06 Dec 2013 19:20:07 -0800, Dan Stromberg wrote: > On Fri, Dec 6, 2013 at 6:07 PM, Steven D'Aprano < > steve+comp.lang.pyt...@pearwood.info> wrote: >> The beauty of Python is that it is a multi-paradigm language. You can >> write imperative, procedural, functional, OOP, or pipelining styl

Re: noobie needs help with ctypes

2013-12-09 Thread Steven D'Aprano
On Tue, 10 Dec 2013 02:27:28 +, Sells, Fred wrote: > My management requires that we stick with the version that comes with > CentOs which is 2.6. I know that it’s possible to have multiple > versions co-resident with or without virtualenv, but policy is policy ☹ And a perfectly reasonable p

Re: interactive help on the base object

2013-12-09 Thread Steven D'Aprano
On Mon, 09 Dec 2013 05:59:29 -0500, Ned Batchelder wrote: [...] > And the cycle continues: [...] > Maybe we could just not? A reasonable request, but just because it's reasonable doesn't mean it is a no-brainer that we shouldn't engage with Mark. While I'm very confident at this point that he

RE: noobie needs help with ctypes

2013-12-09 Thread Sells, Fred
My management requires that we stick with the version that comes with CentOs which is 2.6. I know that it’s possible to have multiple versions co-resident with or without virtualenv, but policy is policy ☹ From: Python-list [mailto:python-list-bounces+frsells=adventistcare@python.org] O

Re: Programming puzzle with boolean circuits

2013-12-09 Thread Chris Angelico
On Tue, Dec 10, 2013 at 1:03 PM, Joel Goldstick wrote: > Chris, and all.. Since you posted yours, I post this for your pleasure. I > couldn't figure out what you were doing. > [chomp Python implementation of a fairly elegant solution] That's a fairly nice piece of code that comes from a delibera

Fwd: Programming puzzle with boolean circuits

2013-12-09 Thread Joel Goldstick
Chris, and all.. Since you posted yours, I post this for your pleasure. I couldn't figure out what you were doing. #!/usr/bin/env python """ This is a puzzle brought up on the python mailing list. The goal is to take 3 bits and invert them using boolean logic, but restricted to only 2 NOT gates

Re: Programming puzzle with boolean circuits

2013-12-09 Thread Chris Angelico
On Tue, Dec 10, 2013 at 12:25 AM, Chris Angelico wrote: > Unfortunately I haven't been able to prove that the code works, > because even with some changes it's taking way too long. But hey, it's > a crazy fun piece to work with! Well... it eventually solved the problem. I don't know how many CPU

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

2013-12-09 Thread Rhodri James
On Mon, 09 Dec 2013 23:42:14 -, Roy Smith wrote: In article , "Rhodri James" wrote: Pascal and BCPL contrasted rigid typing with practically non-existent typing Wow, you actually used BCPL? I didn't realize the language ever had any real use. I had only ever heard of it in the conte

Re: squeeze out some performance

2013-12-09 Thread Mark Lawrence
On 06/12/2013 08:47, Robert Voigtländer wrote: Hi, I try to squeeze out some performance of the code pasted on the link below. http://pastebin.com/gMnqprST The code will be used to continuously analyze sonar sensor data. I set this up to calculate all coordinates in a sonar cone without heavy

Re: interactive help on the base object

2013-12-09 Thread Mark Lawrence
On 09/12/2013 05:00, Terry Reedy wrote: I think it can be. If you prefer me to open the issue, say so. We should look for existing issues, and closed issues that rejected change. Thanks for the offer Terry and yes, please open an issue. -- My fellow Pythonistas, ask not what our language can

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

2013-12-09 Thread Roy Smith
In article , "Rhodri James" wrote: > Pascal and BCPL contrasted rigid typing with practically non-existent > typing Wow, you actually used BCPL? I didn't realize the language ever had any real use. I had only ever heard of it in the context of being a C precursor, mentioned once in an int

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

2013-12-09 Thread Rhodri James
On Mon, 09 Dec 2013 12:23:41 -, Oscar Benjamin wrote: Some of the objections to the idea that were voiced in the meeting were that: 1) Some people felt that Python is not an "industry standard" unlike C/C++/Java and that it is not as good for employability. 2) Students should learn to p

Re: python programming help

2013-12-09 Thread Christopher Welborn
On 08/12/2013 18:14, rafaella...@gmail.com wrote: sorry but i'm new to python ;p 1. it has to be in a form of a function called people and 2. how this code takes in an age and returns the names? "it has to be in the form of a function called people", that made me laugh. Too bad he got an ans

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

2013-12-09 Thread Conor Hughes
Terry Reedy writes: > A few years ago, MIT switched from Scheme (which I believe originated > at MIT) to Python for its first course. There might faculty blogs > discussing the reasons. In any case, the course is one of MIT's free > online offerings. Berkeley recently made the same transition. T

Re: Possible PEP Submission

2013-12-09 Thread Terry Reedy
On 12/9/2013 3:36 PM, Logan Collins wrote: Just checking whether 1) a PEP is the proper place for this No, not needed. If, after discussion here (or python-ideas), such a change would only need a tracker issue. and 2) what y'all think about it. I would like to propose a change to the the

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

2013-12-09 Thread Roy Smith
In article , bob gailer wrote: > Understanding the real machine may be of interest to some but is not > essential. Surprisingly (to myself, anyway), I agree. Languages like C, Fortran, and Java, are fairly close to the machine. They all expose (C more than the others) fundamental machine fe

Re: Possible PEP Submission

2013-12-09 Thread MRAB
On 09/12/2013 20:36, Logan Collins wrote: Just checking whether 1) a PEP is the proper place for this and 2) what y'all think about it. I would like to propose a change to the the 're' standard library to support iterables. So, something like the following would work: import re text = """hello

Re: Possible PEP Submission

2013-12-09 Thread Tim Chase
On 2013-12-09 14:36, Logan Collins wrote: > Just checking whether 1) a PEP is the proper place for this and 2) > what y'all think about it. > > I would like to propose a change to the the 're' standard library to > support iterables. > > So, something like the following would work: > > import re

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

2013-12-09 Thread bob gailer
On 12/9/2013 7:23 AM, Oscar Benjamin wrote: [snip] I'm interested to know if anyone can share experience of a similar situation or can point to any case studies about this. Taking the opposite perspective from Gene: I think Python is great as an intro to computing and programming. Give a stude

Re: Spoiler alert? (Re: Programming puzzle with boolean circuits)

2013-12-09 Thread Joel Goldstick
On Mon, Dec 9, 2013 at 3:39 PM, John Ladasky wrote: > It has been ages since I've thought about logic gates, but... > > My thought is that with two NOT logic gates, you can only build a > flip-flop memory circuit. That strongly suggests to me that a memory > circuit would actually be used to solv

Re: squeeze out some performance

2013-12-09 Thread Dave Angel
On Mon, 09 Dec 2013 15:54:36 +, Robin Becker wrote: On 06/12/2013 22:07, Joel Goldstick wrote: > end, start = start, end a similar behaviour for simple assignments for less than 4 variables the tuple method is faster. What does speed have to do with it? When you want to swap tw

Spoiler alert? (Re: Programming puzzle with boolean circuits)

2013-12-09 Thread John Ladasky
It has been ages since I've thought about logic gates, but... (Spoiler alert? I'm not sure...) . . . . . . . . . . . . . . . . My thought is that with two NOT logic gates, you can only build a flip-flop memory circuit. That strongly suggests to me that a memory circuit would

Possible PEP Submission

2013-12-09 Thread Logan Collins
Just checking whether 1) a PEP is the proper place for this and 2) what y'all think about it. I would like to propose a change to the the 're' standard library to support iterables. So, something like the following would work: import re text = """hello user hello user hello user""" users = ["Bo

Re: noobie needs help with ctypes

2013-12-09 Thread Joel Goldstick
On Mon, Dec 9, 2013 at 3:15 PM, Terry Reedy wrote: > On 12/9/2013 2:24 PM, Sells, Fred wrote: > >> I'm using python 2.6 on Linux/CentOs 6.x >> > > I would use the latest 2.7 (or 3.3) for a new project if at all possible. > > I seem to recall that Centos needs 2.6 as default python for its own pur

Re: Programming puzzle with boolean circuits

2013-12-09 Thread Joel Goldstick
On Mon, Dec 9, 2013 at 6:49 AM, Johannes Bauer wrote: > Hi group, > > it's somewhat OT here, but I have a puzzle to which I would like a > solution -- but I'm unsure how I should tackle the problem with Python. > But it's a fun puzzle, so maybe it'll be appreciated here. > > The question is: How

Re: noobie needs help with ctypes

2013-12-09 Thread Terry Reedy
On 12/9/2013 2:24 PM, Sells, Fred wrote: I'm using python 2.6 on Linux/CentOs 6.x I would use the latest 2.7 (or 3.3) for a new project if at all possible. I'm getting ctypes to work, but getting stuck on the use of .argtypes. Can someone point out what I'm doing. This is my first use of

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

2013-12-09 Thread Terry Reedy
On 12/9/2013 7:23 AM, Oscar Benjamin wrote: Hi all, I work in a University Engineering faculty teaching, among other things, programming. In our last meeting about improving our teaching syllabus and delivery we've identified the first year programming courses as an area where there is room for

Re: problem with graph of python(show)

2013-12-09 Thread Mark Lawrence
On 09/12/2013 19:34, Asemaneh Allame wrote: hi everybody i recently install python & vpython(v:2.6.7) in my windows(32bit) it install succesfully but dont show some of graphes that involved their code in the lib.python , i dont know what s problem... please giude me thanks By an amazing coi

problem with graph of python(show)

2013-12-09 Thread Asemaneh Allame
hi everybody i recently install python & vpython(v:2.6.7) in my windows(32bit) it install succesfully but dont show some of graphes that involved their code in the lib.python , i dont know what s problem... please giude me thanks -- https://mail.python.org/mailman/listinfo/python-list

noobie needs help with ctypes

2013-12-09 Thread Sells, Fred
I'm using python 2.6 on Linux/CentOs 6.x I'm getting ctypes to work, but getting stuck on the use of .argtypes. Can someone point out what I'm doing. This is my first use of ctypes and it looks like I'm getting different definitions in stackoverflow that may correspond to different version o

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

2013-12-09 Thread William Ray Wing
On Dec 9, 2013, at 11:57 AM, rusi wrote: > On Monday, December 9, 2013 5:53:41 PM UTC+5:30, Oscar Benjamin wrote: >> 5) Learning to program "should be painful" and we should expect the >> students to complain about it (someone actually said that!) but the >> pain makes them better programmers in

Re: Meta Fight About Posting (was: python programming help)

2013-12-09 Thread Roy Smith
In article <058a0d03-4017-4e95-b402-94d8959ec...@googlegroups.com>, rusi wrote: > On Monday, December 9, 2013 9:14:08 PM UTC+5:30, Travis Griggs wrote: > > As long as we¹re in full scale rant drift, I¹d like to remind others > > of the time honored tradition of changing the post subject, when, >

Re: Meta Fight About Posting (was: python programming help)

2013-12-09 Thread Roy Smith
In article , Travis Griggs wrote: > The python mailing list is the only one I know of that is cross posted > between 3 different technologies. Maybe it¹s an outgrowth of the ³multi > paradigm² philosophy of python or something. Usenet is not a bicycle. -- https://mail.python.org/mailman/list

Re: ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'S SIZE 11.5 NEW IN BOX', '$49.99')'

2013-12-09 Thread MRAB
On 09/12/2013 09:32, Daniel Watkins wrote: On Mon, Dec 09, 2013 at 12:41:57AM -0800, Jai wrote: sql = """insert into `category` (url, catagory,price) VAlUES ('%s', '%s', '%s')"""%(link1,x,y) sql = unicodedata.normalize('NFKD', sql).encode('ascii','ignore') cursor.execute

Re: multiprocessing: child process share changes to global variable

2013-12-09 Thread Alan
I received a suggestion off list that my results indicated that the jobs were not being distributed across the pool workers. I used mp.current_process().name to confirm this suggestion. Alan Isaac -- https://mail.python.org/mailman/listinfo/python-list

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

2013-12-09 Thread rusi
On Monday, December 9, 2013 5:53:41 PM UTC+5:30, Oscar Benjamin wrote: > 5) Learning to program "should be painful" and we should expect the > students to complain about it (someone actually said that!) but the > pain makes them better programmers in the end. Yeah this will get some people's back

Re: Meta Fight About Posting (was: python programming help)

2013-12-09 Thread rusi
On Monday, December 9, 2013 9:55:19 PM UTC+5:30, rusi wrote: > On Monday, December 9, 2013 9:14:08 PM UTC+5:30, Travis Griggs wrote: > > As long as we’re in full scale rant drift, I’d like to remind others > > of the time honored tradition of changing the post subject, when, > > er, uh, the subject

Re: Meta Fight About Posting (was: python programming help)

2013-12-09 Thread rusi
On Monday, December 9, 2013 9:14:08 PM UTC+5:30, Travis Griggs wrote: > As long as we’re in full scale rant drift, I’d like to remind others > of the time honored tradition of changing the post subject, when, > er, uh, the subject changes. Because this obviously is not > "programming help" anymore.

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

2013-12-09 Thread Chris Angelico
On Tue, Dec 10, 2013 at 3:06 AM, Roy Smith wrote: > Not sure what the proves, other than these are the languages people who > are looking for jobs know (or at least claim to know). That's the converse of what I was talking about. Employability of a skill depends on how many employers are looking

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

2013-12-09 Thread Gene Heskett
On Monday 09 December 2013 10:46:42 Larry Martell did opine: > On Mon, Dec 9, 2013 at 8:24 AM, Gene Heskett wrote: > > On Monday 09 December 2013 07:51:12 Oscar Benjamin did opine: > >> Hi all, > >> > >> I work in a University Engineering faculty teaching, among other > >> things, programming. I

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

2013-12-09 Thread Roy Smith
In article , Chris Angelico wrote: > On Mon, Dec 9, 2013 at 11:23 PM, Oscar Benjamin > wrote: > > 1) Some people felt that Python is not an "industry standard" unlike > > C/C++/Java and that it is not as good for employability. > > Disprove that by checking any job listing site in your area/in

Re: squeeze out some performance

2013-12-09 Thread Robin Becker
On 06/12/2013 22:07, Joel Goldstick wrote: .. Not that this will speed up your code but you have this: if not clockwise: s = start start = end end = s Python people would write: end, start = start, end this works for some small number of variabl

Meta Fight About Posting (was: python programming help)

2013-12-09 Thread Travis Griggs
On Dec 9, 2013, at 1:34 AM, Mark Lawrence wrote: > On 09/12/2013 05:07, ru...@yahoo.com wrote: >> On 12/08/2013 05:27 PM, Mark Lawrence wrote: >>> On 09/12/2013 00:08, ru...@yahoo.com wrote: On 12/08/2013 12:17 PM, Chris Angelico wrote: > On Mon, Dec 9, 2013 at 6:06 AM, wrote:>[...] >

Re: interactive help on the base object

2013-12-09 Thread Mark Lawrence
On 09/12/2013 10:12, Ian Kelly wrote: On Sun, Dec 8, 2013 at 4:01 PM, Mark Janssen wrote: Likewise, WITH A COMPUTER, there is a definite order which can't be countermanded by simply having this artifice called "Object". If you FEE(L)s hadn't noticed (no longer using the insult "foo"s out of re

Re: squeeze out some performance

2013-12-09 Thread Mark Lawrence
On 09/12/2013 14:19, Robert Voigtländer wrote: Am Samstag, 7. Dezember 2013 00:01:49 UTC+1 schrieb Dan Stromberg: On Fri, Dec 6, 2013 at 2:38 PM, Mark Lawrence wrote: On 06/12/2013 16:52, John Ladasky wrote: On Friday, December 6, 2013 12:47:54 AM UTC-8, Robert Voigtländer wrote: I try

Re: squeeze out some performance

2013-12-09 Thread Robert Voigtländer
Am Samstag, 7. Dezember 2013 00:01:49 UTC+1 schrieb Dan Stromberg: > On Fri, Dec 6, 2013 at 2:38 PM, Mark Lawrence wrote: > > > On 06/12/2013 16:52, John Ladasky wrote: > > > On Friday, December 6, 2013 12:47:54 AM UTC-8, Robert Voigtländer wrote: > > > > > I try to squeeze out some perfor

Re: One liners

2013-12-09 Thread Chris Angelico
On Tue, Dec 10, 2013 at 12:49 AM, Neil Cerutti wrote: > names = (p.name for p in db.query_people() if p.total_purchases > 0) > names = (n.upper() for n in names) > names = (n for n in names if not n.startswith("Q")) > for n in names: ># Finally actually do something. > > Coincidentally it's a

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

2013-12-09 Thread rusi
On Monday, December 9, 2013 5:53:41 PM UTC+5:30, Oscar Benjamin wrote: > Hi all, > I work in a University Engineering faculty teaching, among other > things, programming. In our last meeting about improving our teaching > syllabus and delivery we've identified the first year programming > courses

Re: One liners

2013-12-09 Thread Neil Cerutti
On 2013-12-07, Dan Stromberg wrote: > BTW, what's pipelining style? Like bash? I think, in Python, it might refer to composing your program of a series of generators. names = (p.name for p in db.query_people() if p.total_purchases > 0) names = (n.upper() for n in names) names = (n for n in name

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

2013-12-09 Thread Larry Martell
On Mon, Dec 9, 2013 at 8:24 AM, Gene Heskett wrote: > On Monday 09 December 2013 07:51:12 Oscar Benjamin did opine: > >> Hi all, >> >> I work in a University Engineering faculty teaching, among other >> things, programming. In our last meeting about improving our teaching >> syllabus and delivery

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

2013-12-09 Thread Chris Angelico
On Mon, Dec 9, 2013 at 11:23 PM, Oscar Benjamin wrote: > 1) Some people felt that Python is not an "industry standard" unlike > C/C++/Java and that it is not as good for employability. Disprove that by checking any job listing site in your area/industry. You'll find plenty of Python jobs there.

Re: Programming puzzle with boolean circuits

2013-12-09 Thread Chris Angelico
On Mon, Dec 9, 2013 at 10:49 PM, Johannes Bauer wrote: > The question is: How do you design a boolean circuit that contains at > most 2 NOT gates, but may contain as many AND or OR gates that inverts > three inputs? IOW: Build three inverters by using only two inverters > (and an infinite amount o

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

2013-12-09 Thread Gene Heskett
On Monday 09 December 2013 07:51:12 Oscar Benjamin did opine: > Hi all, > > I work in a University Engineering faculty teaching, among other > things, programming. In our last meeting about improving our teaching > syllabus and delivery we've identified the first year programming > courses as an

Experiences/guidance on teaching Python as a first programming language

2013-12-09 Thread Oscar Benjamin
Hi all, I work in a University Engineering faculty teaching, among other things, programming. In our last meeting about improving our teaching syllabus and delivery we've identified the first year programming courses as an area where there is room for improvement and we're considering (mainly on m

Programming puzzle with boolean circuits

2013-12-09 Thread Johannes Bauer
Hi group, it's somewhat OT here, but I have a puzzle to which I would like a solution -- but I'm unsure how I should tackle the problem with Python. But it's a fun puzzle, so maybe it'll be appreciated here. The question is: How do you design a boolean circuit that contains at most 2 NOT gates, b

Re: interactive help on the base object

2013-12-09 Thread Ned Batchelder
On 12/9/13 12:11 AM, Steven D'Aprano wrote: On Sun, 08 Dec 2013 15:01:59 -0800, Mark Janssen wrote: On Sun, Dec 8, 2013 at 2:33 AM, Steven D'Aprano wrote: On Sat, 07 Dec 2013 20:21:06 -0800, Mark Janssen wrote: Is it just me, or is this basically useless? class object | The most *base*

Re: interactive help on the base object

2013-12-09 Thread Ian Kelly
On Sun, Dec 8, 2013 at 4:01 PM, Mark Janssen wrote: > Likewise, WITH A COMPUTER, there is a definite order which can't be > countermanded by simply having this artifice called "Object". If you > FEE(L)s hadn't noticed (no longer using the insult "foo"s out of > respect for the sensativities of th

Re: interactive help on the base object

2013-12-09 Thread Mark Lawrence
On 09/12/2013 06:44, rusi wrote: On Monday, December 9, 2013 10:56:28 AM UTC+5:30, ru...@yahoo.com wrote: On 12/08/2013 09:46 PM, rusi wrote: On Monday, December 9, 2013 9:46:30 AM UTC+5:30, Steven D'Aprano wrote: On Sun, 08 Dec 2013 18:58:09 -0800, rusi wrote: [...] Does GG not give you som

Re: python programming help

2013-12-09 Thread Mark Lawrence
On 09/12/2013 05:07, ru...@yahoo.com wrote: On 12/08/2013 05:27 PM, Mark Lawrence wrote: On 09/12/2013 00:08, ru...@yahoo.com wrote: On 12/08/2013 12:17 PM, Chris Angelico wrote: On Mon, Dec 9, 2013 at 6:06 AM, wrote:>[...] [...] To the OP, please ignore the above, it's sheer, unadulterated

Re: ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'S SIZE 11.5 NEW IN BOX', '$49.99')'

2013-12-09 Thread Chris Angelico
On Mon, Dec 9, 2013 at 7:41 PM, Jai wrote: > for x , y in zip(lst_content, lst_price): > sql = """insert into `category` (url, catagory,price) VAlUES ('%s', > '%s', '%s')"""%(link1,x,y) > #print sql > sql = unicodedata.normalize('NFKD', sql).encode('ascii','ignore') >

Re: ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'S SIZE 11.5 NEW IN BOX', '$49.99')'

2013-12-09 Thread Daniel Watkins
On Mon, Dec 09, 2013 at 12:41:57AM -0800, Jai wrote: > sql = """insert into `category` (url, catagory,price) VAlUES ('%s', > '%s', '%s')"""%(link1,x,y) > sql = unicodedata.normalize('NFKD', sql).encode('ascii','ignore') > cursor.execute(sql) > > ProgrammingError: (1064, "Y

Re: using ffmpeg command line with python's subprocess module

2013-12-09 Thread iMath
在 2013年12月6日星期五UTC+8下午10时59分43秒,Chris Angelico写道: > On Sat, Dec 7, 2013 at 1:54 AM, iMath wrote: > > > fp=tempfile.NamedTemporaryFile(delete=False) > > > fp.write(("file '"+fileName1+"'\n").encode('utf-8')) > > > fp.write(("file '"+fileName2+"'\n").encode('utf-8')) > > > > > > >

ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'S SIZE 11.5 NEW IN BOX', '$49.99')' at

2013-12-09 Thread Jai
from BeautifulSoup import BeautifulSoup import re, urllib2, MySQLdb #MySQLdb.escape_string(" ") import sys import unicodedata if __name__=="__main__": #link = raw_input("Enter the url link: ") db = MySQLdb.connect("localhost","root","", "ebay") cursor=db.cursor() link = "http://w

Qml Error on CentOS6.4 when ./configure ?

2013-12-09 Thread levinie
I install latest QT5 and PyQt5 on CentOS6.4 And here is some error: g++ -c -pipe -O2 -fPIC -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt/5.1.1/gcc_64/mkspecs/linux-g++ -I. -I. -I../../QtQml -I/opt/python/include/python2.7 -I/opt/Qt/5.1.1/

Re: python programming help

2013-12-09 Thread Chris Angelico
On Mon, Dec 9, 2013 at 4:10 PM, wrote: > We all use buggy software every day. *Every* piece of non-trival > software is buggy -- you already know that. So you are saying > that bugs that annoy *you* are ones that *others* should change > their practice to join your boycott to fix. The ones tha

Re: interactive help on the base object

2013-12-09 Thread Chris Angelico
On Mon, Dec 9, 2013 at 6:31 PM, Alan Bawden wrote: > I don't believe that this was done for any deep principled reason, but > rather it was just permitted because the algorithm for computing method > resolution order didn't actually care whether there were inheritance > cycles -- it still terminat