comp.lang.python - 26 new messages in 11 topics - digest
comp.lang.python
http://groups.google.com/group/comp.lang.python?hl=en
comp.lang.python@googlegroups.com
Today's topics:
* interactive help on the base object - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/43d86819eed5d4f5?hl=en
* Permission for contribution: http://bugs.python.org/issue19940 - 2 messages,
1 author
http://groups.google.com/group/comp.lang.python/t/5b754750ed6362b9?hl=en
* squeeze out some performance - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.python/t/fcfb9222eca0be93?hl=en
* noobie needs help with ctypes - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/54fcd890272a5285?hl=en
* Problem when applying Patch from issue1424152 to get https over
authenticating proxies working with urllib2 in Python 2.5 - 10 messages, 5
authors
http://groups.google.com/group/comp.lang.python/t/d943f1b7dc848b63?hl=en
* using ffmpeg command line with python's subprocess module - 1 messages, 1
author
http://groups.google.com/group/comp.lang.python/t/047a9cfb5f16229e?hl=en
* Programming puzzle with boolean circuits - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/331f49604f38d341?hl=en
* Experiences/guidance on teaching Python as a first programming language - 1
messages, 1 author
http://groups.google.com/group/comp.lang.python/t/e5f7ee8f1f266c48?hl=en
* 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 line 1") - 2 messages, 2
authors
http://groups.google.com/group/comp.lang.python/t/3c6fc5419375a33f?hl=en
* Movie (MPAA) ratings and Python? - 2 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/88b2dc80c844f5bc?hl=en
* Trouble with Multi-threading - 3 messages, 3 authors
http://groups.google.com/group/comp.lang.python/t/6fc100625f07b0a4?hl=en
==============================================================================
TOPIC: interactive help on the base object
http://groups.google.com/group/comp.lang.python/t/43d86819eed5d4f5?hl=en
==============================================================================
== 1 of 1 ==
Date: Tues, Dec 10 2013 3:51 am
From: rusi
On Tuesday, December 10, 2013 3:07:36 PM UTC+5:30, Mark Lawrence wrote:
> On 10/12/2013 05:16, 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.
> > Well OOP on the python list is certainly on topic.
> > Interminable discussions about why redrawing the inheritance arrows
> > the other way round will save the world is OT (for me!)
> One of the great joys of reading this list is how wonderfully OT it can
> get. I have the right to make this statement as I started *THIS*
> thread. Now what *WERE* we talking about? :)
My boy, I see that you are making progress towards your guru -- Nikos.
"You are spamming MY THREAD"
==============================================================================
TOPIC: Permission for contribution: http://bugs.python.org/issue19940
http://groups.google.com/group/comp.lang.python/t/5b754750ed6362b9?hl=en
==============================================================================
== 1 of 2 ==
Date: Tues, Dec 10 2013 3:59 am
From: Tim Golden
On 10/12/2013 11:35, shankha wrote:
> I wish to make contribution to Python source code. I have studied the
> developers guide and made myself familiar with mercurial. I wish to
> start of with some doc bugs as this will give me insight into
> how the whole process(review, tests, patches) works. Is it okay if to take:
>
> http://bugs.python.org/issue19940.
>
>
> Will update the bug report once you guys are fine with it. My platform
> will primarily be Linux.
> Thanks
> Gudge
Welcome Gudge, and thanks for wanting to contribute. We're a fairly open
organisation, so you don't need anyone's permission to start
contributing: just add your comments or your patch to the issue you want
to work on.
The core-mentorship mailing list might be of use to you: it is
specifically aimed at people wanting help with contributing to Python.
It has special conditions to make it more friendly to people who might
be shy of looking foolish on a public mailing list. Feel free to subscribe:
https://mail.python.org/mailman/listinfo/core-mentorship
(see also http://pythonmentors.com/ which acts as a landing page for the
list)
Good luck
TJG
== 2 of 2 ==
Date: Tues, Dec 10 2013 4:03 am
From: Tim Golden
On 10/12/2013 11:35, shankha wrote:
> I wish to make contribution to Python source code. I have studied the
> developers guide and made myself familiar with mercurial. I wish to
> start of with some doc bugs as this will give me insight into
> how the whole process(review, tests, patches) works. Is it okay if to take:
>
> http://bugs.python.org/issue19940.
Having just glanced at that issue, I would point out that there's been a
lot of development around the ssl module for the 3.4 release, so you
definitely want to confirm the issue against the hg tip to ensure it
still applies.
TJG
==============================================================================
TOPIC: squeeze out some performance
http://groups.google.com/group/comp.lang.python/t/fcfb9222eca0be93?hl=en
==============================================================================
== 1 of 2 ==
Date: Tues, Dec 10 2013 4:14 am
From: Robert Voigtländer
> Actually for optimised code it looks very similar to some code posted
>
> here
>
> http://www.daniweb.com/software-development/python/threads/321181/python-bresenham-circle-arc-algorithm
>
> over three years ago.
>
This is where it origins from. I just extended it for my needs and now want to optimize it.
List comprehensions instead of some for loops brought another 25%. And made the code shorter.
== 2 of 2 ==
Date: Tues, Dec 10 2013 4:54 am
From: Robin Becker
On 09/12/2013 20:46, Dave Angel wrote:
> On Mon, 09 Dec 2013 15:54:36 +0000, Robin Becker <robin@reportlab.com> 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 two variables, the
> tuple assignment reads better.
>
Well the OP is asking about performance so I guess the look and feel might be
sacrificed for speed in some circumstances.
The tuple approach is more appealing when the lhs & rhs are connected, but it
seems that even for more general assignments the tuple assignment may be faster
for small numbers of variables. Looking at the output of dis for this case
d,e,f=c,b,a
it seems that we get code like this
LOAD_NAME 3 (c)
LOAD_NAME 2 (b)
LOAD_NAME 1 (a)
ROT_THREE
ROT_TWO
STORE_NAME 4 (d)
STORE_NAME 5 (e)
STORE_NAME 6 (f)
for
d = c
e = b
f = a
we get this
LOAD_NAME 3 (c)
STORE_NAME 4 (d)
LOAD_NAME 2 (b)
STORE_NAME 5 (e)
LOAD_NAME 1 (a)
STORE_NAME 6 (f)
which is not obviously slower, but I consistently get the former to be faster. I
suppose it's a cache issue or something. However, for this particular case when
the variables are not connected I find the tuple assignment less pythonic, but
perhaps faster (even though in this case no tuples are built).
--
Robin Becker
==============================================================================
TOPIC: noobie needs help with ctypes
http://groups.google.com/group/comp.lang.python/t/54fcd890272a5285?hl=en
==============================================================================
== 1 of 1 ==
Date: Tues, Dec 10 2013 5:14 am
From: "Sells, Fred"
Mucho apologies for rich text, I think I picked that up when replying to a post without properly checking. Thanks for heads up.
Fred.
==============================================================================
TOPIC: Problem when applying Patch from issue1424152 to get https over
authenticating proxies working with urllib2 in Python 2.5
http://groups.google.com/group/comp.lang.python/t/d943f1b7dc848b63?hl=en
==============================================================================
== 1 of 10 ==
Date: Tues, Dec 10 2013 5:35 am
From: harish.barvekar@gmail.com
On Monday, July 20, 2009 11:28:53 PM UTC+5:30, tvashtar wrote:
> On Jul 20, 4:42 pm, Nike <nike...@gmail.com> wrote:
> > hi!
> > It's looks like a ssl error . Under the following step to help u :
> > 1. takes a simple code to confirm your pupose without ssl protocol.
> > 2. to confirm python version and extended libs work well
> > 3. to confirm ssl work well.
> >
> > goog luck!
> >
> > nikekoo
>
> I've reduced my code to the following:
>
> import urllib2
>
> p = "https://user:pass@myproxy:port"
> proxy_handler = urllib2.ProxyHandler({"https": p})
> urllib2.install_opener(urllib2.build_opener(proxy_handler))
> request = urllib2.Request( "https://groups.google.com")
> response = urllib2.urlopen(request)
>
> and it is now failing with:
>
> Traceback (most recent call last):
> File "D:\p4\depot\Development\HEAD\Build\ReleaseSystem\DownloadSystem
> \test.py", line 12, in <module>
> response = urllib2.urlopen(request)
> File "C:\Python25\lib\urllib2.py", line 121, in urlopen
> return _opener.open(url, data)
> File "C:\Python25\lib\urllib2.py", line 379, in open
> response = self._open(req, data)
> File "C:\Python25\lib\urllib2.py", line 397, in _open
> '_open', req)
> File "C:\Python25\lib\urllib2.py", line 358, in _call_chain
> result = func(*args)
> File "C:\Python25\lib\urllib2.py", line 1115, in https_open
> return self.do_open(httplib.HTTPSConnection, req)
> File "C:\Python25\lib\urllib2.py", line 1082, in do_open
> raise URLError(err)
> urllib2.URLError: <urlopen error Tunnel connection failed: 407 Proxy
> Authentication Required>
>
> I thought the proxy_handler should take care of the authentication?
>
> Thanks for your help
Is this issue fixed. I am also facing the same issue of tunneling in https request. Please suggest how to proceed further
== 2 of 10 ==
Date: Tues, Dec 10 2013 5:47 am
From: Chris Angelico
On Wed, Dec 11, 2013 at 12:35 AM, <harish.barvekar@gmail.com> wrote:
> Is this issue fixed. I am also facing the same issue of tunneling in https request. Please suggest how to proceed further
You're responding to something from 2009. It's highly likely things
have changed.
Does the same code cause an error in Python 2.7? That would be the
first thing to check.
Also: You appear to be using Google Groups, which is the Mos Eisley of
the newsgroup posting universe. You'll do far better to instead use
some other means of posting, such as the mailing list:
https://mail.python.org/mailman/listinfo/python-list
It's probably a good idea also to search the bug tracker before
posting. It may well be that this has been fixed, in which case the
tracker issue would tell you when the fix went out. Of course, it may
also state that it's not a bug, in which case you'd know why.
http://bugs.python.org/
ChrisA
== 3 of 10 ==
Date: Tues, Dec 10 2013 5:48 am
From: Mark Lawrence
On 10/12/2013 13:35, harish.barvekar@gmail.com wrote:
> On Monday, July 20, 2009 11:28:53 PM UTC+5:30, tvashtar wrote:
>> On Jul 20, 4:42 pm, Nike <nike...@gmail.com> wrote:
>>> hi!
>>> It's looks like a ssl error . Under the following step to help u :
>>> 1. takes a simple code to confirm your pupose without ssl protocol.
>>> 2. to confirm python version and extended libs work well
>>> 3. to confirm ssl work well.
>>>
>>> goog luck!
>>>
>>> nikekoo
>>
>> I've reduced my code to the following:
>>
>> import urllib2
>>
>> p = "https://user:pass@myproxy:port"
>> proxy_handler = urllib2.ProxyHandler({"https": p})
>> urllib2.install_opener(urllib2.build_opener(proxy_handler))
>> request = urllib2.Request( "https://groups.google.com")
>> response = urllib2.urlopen(request)
>>
>> and it is now failing with:
>>
>> Traceback (most recent call last):
>> File "D:\p4\depot\Development\HEAD\Build\ReleaseSystem\DownloadSystem
>> \test.py", line 12, in <module>
>> response = urllib2.urlopen(request)
>> File "C:\Python25\lib\urllib2.py", line 121, in urlopen
>> return _opener.open(url, data)
>> File "C:\Python25\lib\urllib2.py", line 379, in open
>> response = self._open(req, data)
>> File "C:\Python25\lib\urllib2.py", line 397, in _open
>> '_open', req)
>> File "C:\Python25\lib\urllib2.py", line 358, in _call_chain
>> result = func(*args)
>> File "C:\Python25\lib\urllib2.py", line 1115, in https_open
>> return self.do_open(httplib.HTTPSConnection, req)
>> File "C:\Python25\lib\urllib2.py", line 1082, in do_open
>> raise URLError(err)
>> urllib2.URLError: <urlopen error Tunnel connection failed: 407 Proxy
>> Authentication Required>
>>
>> I thought the proxy_handler should take care of the authentication?
>>
>> Thanks for your help
>
> Is this issue fixed. I am also facing the same issue of tunneling in https request. Please suggest how to proceed further
>
Please read the whole history of this here
http://bugs.python.org/issue1424152
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
== 4 of 10 ==
Date: Tues, Dec 10 2013 6:06 am
From: Mark Lawrence
On 10/12/2013 13:47, Chris Angelico wrote:
> On Wed, Dec 11, 2013 at 12:35 AM, <harish.barvekar@gmail.com> wrote:
>> Is this issue fixed. I am also facing the same issue of tunneling in https request. Please suggest how to proceed further
>
> You're responding to something from 2009. It's highly likely things
> have changed.
>
Says who? Sadly IMHO this has been one of the worst aspects of Python
development. I've seen 10 year old bugs happily sitting on the bug
tracker. Thankfully that is slowly changing. The core mentorship
program is helping, plus the gradual reduction in the number of versions
that need supporting as 2.6 is now out of support and we move towards
3.4. However there are still 4275 open issues on the bug tracker.
Anyone up to help out, the pay and perks are really good? :)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
== 5 of 10 ==
Date: Tues, Dec 10 2013 6:14 am
From: Chris Angelico
On Wed, Dec 11, 2013 at 1:06 AM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
> On 10/12/2013 13:47, Chris Angelico wrote:
>>
>> On Wed, Dec 11, 2013 at 12:35 AM, <harish.barvekar@gmail.com> wrote:
>>>
>>> Is this issue fixed. I am also facing the same issue of tunneling in
>>> https request. Please suggest how to proceed further
>>
>>
>> You're responding to something from 2009. It's highly likely things
>> have changed.
>>
>
> Says who? Sadly IMHO this has been one of the worst aspects of Python
> development. I've seen 10 year old bugs happily sitting on the bug tracker.
> Thankfully that is slowly changing. The core mentorship program is helping,
> plus the gradual reduction in the number of versions that need supporting as
> 2.6 is now out of support and we move towards 3.4. However there are still
> 4275 open issues on the bug tracker. Anyone up to help out, the pay and
> perks are really good? :)
There've been two minor versions since the version cited in the post
(2.5), not counting Python 3 at all. It's definitely worth rechecking
on 2.7 or 3.3, to see if the same still occurs. (Or, of course, to
read the tracker issue, which in this case was known and needn't be
searched for, a fact that I missed noticing when I went reading.) Yes,
four years' worth of bug fixes does make it at least somewhat likely
that something's changed.
ChrisA
== 6 of 10 ==
Date: Tues, Dec 10 2013 6:54 am
From: Mark Lawrence
On 10/12/2013 14:14, Chris Angelico wrote:
> On Wed, Dec 11, 2013 at 1:06 AM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
>> On 10/12/2013 13:47, Chris Angelico wrote:
>>>
>>> On Wed, Dec 11, 2013 at 12:35 AM, <harish.barvekar@gmail.com> wrote:
>>>>
>>>> Is this issue fixed. I am also facing the same issue of tunneling in
>>>> https request. Please suggest how to proceed further
>>>
>>>
>>> You're responding to something from 2009. It's highly likely things
>>> have changed.
>>>
>>
>> Says who? Sadly IMHO this has been one of the worst aspects of Python
>> development. I've seen 10 year old bugs happily sitting on the bug tracker.
>> Thankfully that is slowly changing. The core mentorship program is helping,
>> plus the gradual reduction in the number of versions that need supporting as
>> 2.6 is now out of support and we move towards 3.4. However there are still
>> 4275 open issues on the bug tracker. Anyone up to help out, the pay and
>> perks are really good? :)
>
> There've been two minor versions since the version cited in the post
> (2.5), not counting Python 3 at all. It's definitely worth rechecking
> on 2.7 or 3.3, to see if the same still occurs. (Or, of course, to
> read the tracker issue, which in this case was known and needn't be
> searched for, a fact that I missed noticing when I went reading.) Yes,
> four years' worth of bug fixes does make it at least somewhat likely
> that something's changed.
>
> ChrisA
>
How many minor versions since this was created on 2002-01-16 at 04:56
http://bugs.python.org/issue504219 ? The issue originally referenced
is closed, this is still open. Age on the bug tracker is no guarantee
of anything, except that the issue exists.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
== 7 of 10 ==
Date: Tues, Dec 10 2013 7:48 am
From: rurpy@yahoo.com
On 12/10/2013 06:47 AM, Chris Angelico wrote:
> On Wed, Dec 11, 2013 at 12:35 AM, <harish.barvekar@gmail.com> wrote:
> Also: You appear to be using Google Groups, which is the Mos Eisley of
> the newsgroup posting universe. You'll do far better to instead use
> some other means of posting, such as the mailing list:
Using Google Groups is also fine. I and many other posters here
use it. Chris and some others here dislike Google Groups and want
everyone to not use it, but that is their personal opinion.
If Google Groups is most convenient for you please feel free to
continue using it. You might want to take a look at this page
which describes how to reduce some of things that annoy people
like Chris:
https://wiki.python.org/moin/GoogleGroupsPython
== 8 of 10 ==
Date: Tues, Dec 10 2013 8:22 am
From: Mark Lawrence
On 10/12/2013 15:48, rurpy@yahoo.com wrote:
> On 12/10/2013 06:47 AM, Chris Angelico wrote:
>> On Wed, Dec 11, 2013 at 12:35 AM, <harish.barvekar@gmail.com> wrote:
>> Also: You appear to be using Google Groups, which is the Mos Eisley of
>> the newsgroup posting universe. You'll do far better to instead use
>> some other means of posting, such as the mailing list:
>
> Using Google Groups is also fine. I and many other posters here
> use it. Chris and some others here dislike Google Groups and want
> everyone to not use it, but that is their personal opinion.
>
> If Google Groups is most convenient for you please feel free to
> continue using it. You might want to take a look at this page
> which describes how to reduce some of things that annoy people
> like Chris:
>
> https://wiki.python.org/moin/GoogleGroupsPython
>
There is no "you might want to" about it. There are two options here,
either read and action the page so we don't see double spaced crap
amongst other things, use another tool, or don't post.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
== 9 of 10 ==
Date: Tues, Dec 10 2013 8:49 am
From: rusi
On Tuesday, December 10, 2013 9:52:47 PM UTC+5:30, Mark Lawrence wrote:
> On 10/12/2013 15:48, rurpy wrote:
> > On 12/10/2013 06:47 AM, Chris Angelico wrote:
> >> On Wed, Dec 11, 2013 at 12:35 AM, harish.barvekar wrote:
> >> Also: You appear to be using Google Groups, which is the Mos Eisley of
> >> the newsgroup posting universe. You'll do far better to instead use
> >> some other means of posting, such as the mailing list:
> > Using Google Groups is also fine. I and many other posters here
> > use it. Chris and some others here dislike Google Groups and want
> > everyone to not use it, but that is their personal opinion.
> > If Google Groups is most convenient for you please feel free to
> > continue using it. You might want to take a look at this page
> > which describes how to reduce some of things that annoy people
> > like Chris:
> > https://wiki.python.org/moin/GoogleGroupsPython
> There is no "you might want to" about it. There are two options here,
> either read and action the page so we don't see double spaced crap
> amongst other things, use another tool, or don't post.
There are 10 kinds of people in the world: those who understand
binary and those who dont.
== 10 of 10 ==
Date: Tues, Dec 10 2013 8:54 am
From: Chris Angelico
On Wed, Dec 11, 2013 at 3:49 AM, rusi <rustompmody@gmail.com> wrote:
> There are 10 kinds of people in the world: those who understand
> binary and those who dont.
There are 10 kinds of people in the world: those who understand Gray
Code, those who don't, and those who confuse it with binary.
ChrisA
==============================================================================
TOPIC: using ffmpeg command line with python's subprocess module
http://groups.google.com/group/comp.lang.python/t/047a9cfb5f16229e?hl=en
==============================================================================
== 1 of 1 ==
Date: Tues, Dec 10 2013 4:59 am
From: Andreas Perstinger
iMath <redstone-cold@163.com> wrote:
>we don't have permission to use the temporary file while it has not
>been closed,but when the file is closed , it will be destroyed by
>default(delete=True),but once we set delete=False,then we couldn't
>depend on the convenience of letting the temporary file automatically
>delete itself after it has been used(then we have to delete it later
>by os.remove()) ,thus there is nearly no convenience in creating a
>temporary file or a persistent one when using NamedTemporaryFile.
In your OP you asked for a platform independent solution thus I don't
think it's possible to do what you want if the OS doesn't support
opening a file another time while it's still open.
Otherwise, on my Linux system this works:
>>> import tempfile, subprocess
>>> with tempfile.NamedTemporaryFile() as fp:
... fp.write(b"foo\nbar\nbaz\n")
... fp.flush()
... subprocess.call(["cat", fp.name])
...
12
foo
bar
baz
0
Bye, Andreas
==============================================================================
TOPIC: Programming puzzle with boolean circuits
http://groups.google.com/group/comp.lang.python/t/331f49604f38d341?hl=en
==============================================================================
== 1 of 1 ==
Date: Tues, Dec 10 2013 6:25 am
From: Antoon Pardon
Op 09-12-13 12:49, Johannes Bauer schreef:
> 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, 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 of AND/OR).
>
> Surprisingly, this is possible (and I even know the solution, but won't
> give it away just yet).
>
> I found this puzzle again and was thinking about: How would I code a
> brute-force approach to this problem in Python? And to my surprise, it
> isn't as easy as I thought. So I'm looking for some advice from you guys
> (never huts to improve ones coding skills).
Well I would make some kind of connecter type, that would have a binary
vector associated with it. How do we calculate bit n of a connector?
Take the three input signals, i0, i1, i2, these can be seen as a binary
digits. So suppose we have input 0, 1, 0 then bit 2 of the connector
would be the value of that connector with these input signals.
The original three connectors would have the following values:
01010101, 00110011, 00001111.
What you can do now is make new connectors by combining them with
an or, and or not port and search for those whose value is 10101010,
11001100 and 11110000.
--
Antoon Pardon
==============================================================================
TOPIC: Experiences/guidance on teaching Python as a first programming language
http://groups.google.com/group/comp.lang.python/t/e5f7ee8f1f266c48?hl=en
==============================================================================
== 1 of 1 ==
Date: Tues, Dec 10 2013 7:36 am
From: rusi
On Tuesday, December 10, 2013 4:12:53 PM UTC+5:30, Oscar Benjamin wrote:
> On 9 December 2013 19:57, Terry Reedy wrote:
> > 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 improvement and we're
> >> considering (mainly on my suggestion) switching to using Python as the
> >> first programming language that we use to introduce our students to
> >> programming. I'm interested to know if anyone can share experience of
> >> a similar situation or can point to any case studies about this.
> > 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.
> Thanks Terry. The best I've found is this:
> http://cemerick.com/2009/03/24/why-mit-now-uses-python-instead-of-scheme-for-its-undergraduate-cs-program/
There's this
http://danweinreb.org/blog/why-did-mit-switch-from-scheme-to-python
which seems to have died -- the internet archive has it here
https://web.archive.org/web/20120429151818/http://danweinreb.org/blog/why-did-mit-switch-from-scheme-to-python
Neither really talks of why python was chosen
In that direction you may want to see why Java has been ousted from CMU:
http://existentialtype.wordpress.com/2011/03/15/teaching-fp-to-freshmen/
==============================================================================
TOPIC: 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 line 1")
http://groups.google.com/group/comp.lang.python/t/3c6fc5419375a33f?hl=en
==============================================================================
== 1 of 2 ==
Date: Tues, Dec 10 2013 8:23 am
From: Dan Stromberg
On Mon, Dec 9, 2013 at 12:41 AM, Jai <jaiprakashsingh213@gmail.com> wrote:
>
> sql = """insert into `category` (url, catagory,price) VAlUES
> ('%s', '%s', '%s')"""%(link1,x,y)
>
Is that VALUES or VAlUES or VAIUES? It probably should be VALUES.
== 2 of 2 ==
Date: Tues, Dec 10 2013 8:28 am
From: Chris Angelico
On Wed, Dec 11, 2013 at 3:23 AM, Dan Stromberg <drsalists@gmail.com> wrote:
>
> On Mon, Dec 9, 2013 at 12:41 AM, Jai <jaiprakashsingh213@gmail.com> wrote:
>>
>>
>> sql = """insert into `category` (url, catagory,price) VAlUES
>> ('%s', '%s', '%s')"""%(link1,x,y)
>
>
> Is that VALUES or VAlUES or VAIUES? It probably should be VALUES.
SQL's case insensitive. But I did have to check carefully to see that
that really was correct.
ChrisA
==============================================================================
TOPIC: Movie (MPAA) ratings and Python?
http://groups.google.com/group/comp.lang.python/t/88b2dc80c844f5bc?hl=en
==============================================================================
== 1 of 2 ==
Date: Tues, Dec 10 2013 8:32 am
From: Dan Stromberg
On Mon, Dec 9, 2013 at 10:40 PM, Ben Finney <ben+python@benfinney.id.au>wrote:
> Dan Stromberg <drsalists@gmail.com> 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?
>
Movie ratings. EG G, PG, PG-13, etc.
A library might query a REST interface or screenscrape, though most
relevant websites have policies against screenscraping.
> > 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.
>
> You seem to be talking about some MPAA document, where is it so we can
> know what specifically you're referring to?
> It's available from many places, EG:
> http://www.filewatcher.com/m/mpaa-ratings-reasons.list.gz.203532-0.html
>
== 2 of 2 ==
Date: Tues, Dec 10 2013 8:35 am
From: Dan Stromberg
On Mon, Dec 9, 2013 at 10:48 PM, Paul Scott <pscott209@gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 10/12/2013 08:40, Ben Finney wrote:
> > Dan Stromberg <drsalists@gmail.com> 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.sourceforge.net/downloads.html as well. It provides a
> relatively simple Python interface to either a local or hosted IMDB
> dataset and allows you to grab the MPAA rating directly from the
> canonical movie name.
>
I believe this was the module I got the farthest with. I was using it
without a local database, instead querying IMDB's website. However, it
appeared to be 2.x only (no 3.x yet), and it was tracebacking a lot.
The rest of the IMDB-related packages on Pypi appeared to have tiny version
numbers, or to have not been updated in quite a while.
==============================================================================
TOPIC: Trouble with Multi-threading
http://groups.google.com/group/comp.lang.python/t/6fc100625f07b0a4?hl=en
==============================================================================
== 1 of 3 ==
Date: Tues, Dec 10 2013 8:21 am
From: dan.rose@parker.com
I am running PYTHON 2.7.3 and executing a PYTHON program that uses
multi-threading. I am running this on a 64-bit Windows 2008 R2 server
(Service Pack 1).
Three months ago, I was able to execute this program just fine. I ran the
program and opened Task Manager and verified that the program successfully
obtained all of the multiple threads it requested.
Now, when I go to run this same program (no changes to the program), I am
getting this message:
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART
================================
>>>
<multiprocessing.queues.Queue object at 0x00000000042309E8>
>>>
I look in Task Manager and I don't see any threads for PYTHON.
So, I am hoping that somebody in this forum could help me out.
What is it that I should look for or turn on to find out what is blocking
this program from creating the threads.
---------------------------------------------------------------------------
Daniel Rose
IT Technical Analyst, MSS Development
Parker Hannifin Corporation
dan.rose@parker.com
216-896-3351
"PLEASE NOTE: The preceding information may be confidential or
privileged. It only should be used or disseminated for the purpose
of conducting business with Parker. If you are not an intended
recipient, please notify the sender by replying to this message and
then delete the information from your system. Thank you for your
cooperation."
== 2 of 3 ==
Date: Tues, Dec 10 2013 8:41 am
From: Dan Stromberg
On Tue, Dec 10, 2013 at 8:21 AM, <dan.rose@parker.com> wrote:
> I am running PYTHON 2.7.3 and executing a PYTHON program that uses
> multi-threading. I am running this on a 64-bit Windows 2008 R2 server
> (Service Pack 1).
>
> Three months ago, I was able to execute this program just fine. I ran the
> program and opened Task Manager and verified that the program successfully
> obtained all of the multiple threads it requested.
>
> Now, when I go to run this same program (no changes to the program), I am
> getting this message:
>
> Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
> on win32
> Type "copyright", "credits" or "license()" for more information.
> >>> ================================ RESTART
> ================================
> >>>
> <multiprocessing.queues.Queue object at 0x00000000042309E8>
> >>>
>
> I look in Task Manager and I don't see any threads for PYTHON.
>
It looks to me like you may be using multiprocessing rather than
multithreading...
Multiprocessing uses multiple processes with shared memory. Multithreading
uses multiple Program Counter's in the same process.
== 3 of 3 ==
Date: Tues, Dec 10 2013 8:51 am
From: Roy Smith
In article <mailman.3837.1386693350.18130.python-list@python.org>,
dan.rose@parker.com wrote:
> "PLEASE NOTE: The preceding information may be confidential or
> privileged. It only should be used or disseminated for the purpose
> of conducting business with Parker. If you are not an intended
> recipient, please notify the sender by replying to this message and
> then delete the information from your system. Thank you for your
> cooperation."
Dan,
Pursuant to your legal notice, I hereby inform you that I received your
message in error. Unfortunately, I am unable to delete it from my
system since I do not control my ISP's news server (and Time Machine has
probably backed up a copy of the local temp file anyway). Please advise
on how I should proceed, so that I am fully in compliance with your
information confidentiality policy.
==============================================================================
You received this message because you are subscribed to the Google Groups "comp.lang.python"
group.
To post to this group, visit http://groups.google.com/group/comp.lang.python?hl=en
To unsubscribe from this group, send email to comp.lang.python+unsubscribe@googlegroups.com
To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.python/subscribe?hl=en
To report abuse, send email explaining the problem to abuse@googlegroups.com
==============================================================================
Google Groups: http://groups.google.com/?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home