EuroPython 2013: Call for Proposals ending soon!

2013-02-26 Thread mena
Call for Proposals for EuroPython 2013 is open. It will run until March 5th, 23:59:59 CET, so don't waste time, hurry up! Visit our webpage: https://ep2013.europython.eu/call-for-proposals/ -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software

Re: Python Newbie

2013-02-26 Thread Larry Hudson
On 02/24/2013 02:43 PM, piterrr.dolin...@gmail.com wrote: snip ... But for the moment I am trying to imitate familiar ground. snip This is EXACTLY why you're having trouble grasping Python. Python is a different language and requires a different mind-set and different approach. In this, it

Re: installation

2013-02-26 Thread Ned Deily
In article 445bf19a-2093-4910-97a5-7f23d6e64...@insightbb.com, Steve Pruitt steve.pru...@insightbb.com wrote: I installed Python 3.3 for the Mac (10.6.8), but I did not get the interpreter installed. I get IDLE and the Launcher, but no interpreter. At least I can't find it. I thought

nested loops

2013-02-26 Thread leonardo
hi everyone, i have the following program: import time count_timer = int(raw_input('how many seconds?: ')) for i in range(count_timer, 0, -1): print i time.sleep(1) print 'blast off!' this is the result: how many seconds?: 5 5 4 3 2 1 blast off! how can i have it print a row of

Re: nested loops

2013-02-26 Thread Sven
Here's one solution import time count_timer = int(raw_input('how many seconds?: ')) for i in range(count_timer, 0, -1): print i, print * * i time.sleep(1) print 'blast off!' On 25 February 2013 22:46, leonardo tampucciol...@libero.it wrote: hi everyone, i have the following

Re: nested loops

2013-02-26 Thread leonardo
thanks for the help, it works Il 26/02/2013 10.58, Sven ha scritto: Here's one solution import time count_timer = int(raw_input('how many seconds?: ')) for i in range(count_timer, 0, -1): ||print i, print * * i time.sleep(1) print 'blast off!' On 25 February 2013 22:46, leonardo

EuroPython 2013: Call for Proposals ending soon!

2013-02-26 Thread mena
Call for Proposals for EuroPython 2013 is open. It will run until March 5th, 23:59:59 CET, so don't waste time, hurry up! Visit our webpage: https://ep2013.europython.eu/call-for-proposals/ -- http://mail.python.org/mailman/listinfo/python-list

Re: IMAP4_SSL and OpenSSL compatibility

2013-02-26 Thread Antoine Pitrou
W. Martin Borgert debacle at debian.org writes: When I add an ssl_version argument to the call to ssl.wrap_socket() in imaplib.IMAP4_SSL.open(), I can connect to the Exchange server without problems: self.sslobj = ssl.wrap_socket(self.sock, self.keyfile, self.certfile,

Nuitka now supports Python 3.2

2013-02-26 Thread Steven D'Aprano
Nuitka now supports Python 3.2 syntax and compiles the full CPython 3.2 test suite. http://nuitka.net/posts/nuitka-release-040.html What is Nuitka? Nuitka is an implementation of Python written in C++. At the moment it is claimed to be about 2.5 times as fast as CPython running the pystone

Do you feel bad because of the Python docs?

2013-02-26 Thread Steven D'Aprano
One week ago, JoePie91 wrote a blog post challenging the Python community and the state of Python documentation, titled: The Python documentation is bad, and you should feel bad. http://joepie91.wordpress.com/2013/02/19/the-python-documentation-is-bad- and-you-should-feel-bad/ It is valuable

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Chris Angelico
On Tue, Feb 26, 2013 at 11:54 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: One week ago, JoePie91 wrote a blog post challenging the Python community and the state of Python documentation, titled: The Python documentation is bad, and you should feel bad.

Re: Small program ideas

2013-02-26 Thread Vytas D.
Hello, Some more ideas: 1. Implement sin(), cos(), tan() etc. The accuracy could be supplied as a parameter to the program. The correctness can be checked very easily with implemented versions. 2. Read a string/file and look for palindromes (the group of words that can read from both ends: A

RE: Nuitka now supports Python 3.2

2013-02-26 Thread Andriy Kornatskyy
Steven, Just in case... pypy1.9 runs this test 22x faster than cpython2.7, see below. python2.7 -c from test import pystone;[pystone.main() for i in range(10)] Pystone(1.1) time for 5 passes = 0.62 This machine benchmarks at 80645.2 pystones/second ... Pystone(1.1) time for 5 passes =

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Roy Smith
In article mailman.2541.1361884843.2939.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: There are some issues with the Googleability of the Python docs at the moment. It's much easier to find the official page of PHP's docs than Python's. Trouble is, the official page of PHP

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Zero Piraeus
: On 26 February 2013 08:54, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: One week ago, JoePie91 wrote a blog post challenging the Python community and the state of Python documentation [...] [...] should we feel bad about Python's docs? The Python docs are my first port of

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Devin Jeanpierre
On Tue, Feb 26, 2013 at 7:54 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: There's no doubt that one of PHP's strengths, perhaps its biggest strength, is the good state of documentation. But should we feel bad about Python's docs? I don't think that either the Python

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Chris Angelico
On Wed, Feb 27, 2013 at 12:56 AM, Roy Smith r...@panix.com wrote: When people ask PHP questions, the questions tend to be phrased as what do I type to get X, and the answers come back that way too. The forums are full of, I had the same problem. Somebody told me to do this. I don't really

Re: Small program ideas

2013-02-26 Thread Neil Cerutti
On 2013-02-26, Vytas D. vytasd2...@gmail.com wrote: Some more ideas: If you like puzzles but not math, then The Python Challenge is an interesting destination. You'll be thrown head first into Python libraries you might not otherwise not be interested, like PIL. Command line apps are not the

Re: Shebang line on Windows?

2013-02-26 Thread Anssi Saari
Michael Torrie torr...@gmail.com writes: Actually, the shell isn't involved in parsing the shebang line at all. That's actually done in the kernel by the program loader. So it's the kernel that has a problem with it; wonder if Linus would accept a patch to ignore the tailing CR? Worth a try

Re: nested loops

2013-02-26 Thread Alister
On Mon, 25 Feb 2013 23:46:11 +0100, leonardo wrote: hi everyone, i have the following program: import time count_timer = int(raw_input('how many seconds?: ')) for i in range(count_timer, 0, -1): print i time.sleep(1) print 'blast off!' this is the result: how many seconds?:

Re: Python Newbie

2013-02-26 Thread Matej Cepl
On 2013-02-23, 15:51 GMT, Chris Angelico wrote: When you learn your first language, you think you're learning to program, but that's not really accurate. Once you've learned half a dozen, you begin to understand something of the art of coding as distinct from any particular language; after

Re: webbrowser.open(./documentation/help.html)-- No Go in Windows

2013-02-26 Thread Matej Cepl
On 2013-02-25, 03:37 GMT, llanitedave wrote: url_link = file:/// + fullpath Isn't this too many slashes. On Linux I get URI file:usr/share/doc/whatever.html which is just too many slashes (it should be three, two for the protocol, one for the root directory). Matěj --

Re: Python Newbie

2013-02-26 Thread Matej Cepl
On 2013-02-23, 18:44 GMT, jmfauth wrote: Very easy to explain: wrong, incorrect, naive unicode handling. PLONK! -- http://mail.python.org/mailman/listinfo/python-list

Re: Small program ideas

2013-02-26 Thread Matej Cepl
On 2013-02-26, 03:48 GMT, eli m wrote: On Friday, February 15, 2013 7:22:41 PM UTC-8, eli m wrote: Any small program ideas? I would prefer to stick to command line ones. Thanks. Thank you guys for the suggestions. Any more? 1) Clone git repository from https://github.com/mcepl/html2text 2)

Difference in RE between 3.2 and 3.3 (or Aaron Swartz memorial)

2013-02-26 Thread Matej Cepl
Hi, as my method to commemorate Aaron Swartz, I have decided to port his html2text to work fully with the latest python 3.3. After some time dealing with various bugs, I have now in my repo https://github.com/mcepl/html2text (branch python3) working solution which works all the way to python

Writing to same file from two threads

2013-02-26 Thread Jens Thoms Toerring
Hi, I noticed in someone elses program that it writes single lines to the same file from (what I call for loss of a better name) the main thread of the program and from a thread sub- sequentally started. This got me worried if it might result in garbled output (i.e. having some output from A

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Steven D'Aprano
On Wed, 27 Feb 2013 01:26:47 +1100, Chris Angelico wrote: And just to add to the pile of ways this could be done, the first response in this thread https://forums.digitalpoint.com/threads/how-to-get-last-character-in- string.796134/ suggests *reversing the string* and indexing from the front.

Re: stmplib MIMEText charset weirdness

2013-02-26 Thread Adam W.
On Tuesday, February 26, 2013 2:10:28 AM UTC-5, Steven D'Aprano wrote: On Mon, 25 Feb 2013 20:00:24 -0800, Adam W. wrote: The documentation for MIMEText is rather terse, but it implies that the parameter given should be a string, not bytes:

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread notbob
On 2013-02-26, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: The Python documentation is bad, and you should feel bad. Ahh! A point at which I can interject. As a rank green python noob, I definitely hava an opinion on python documentation and it's not entirely flattering.

Re: Difference in RE between 3.2 and 3.3 (or Aaron Swartz memorial)

2013-02-26 Thread Terry Reedy
On 2/21/2013 4:22 PM, Matej Cepl wrote: as my method to commemorate Aaron Swartz, I have decided to port his html2text to work fully with the latest python 3.3. After some time dealing with various bugs, I have now in my repo https://github.com/mcepl/html2text (branch python3) working solution

Re: yield expression

2013-02-26 Thread Colin J. Williams
On 24/02/2013 7:36 PM, Ziliang Chen wrote: Hi folks, When I am trying to understand yield expression in Python2.6, I did the following coding. I have difficulty understanding why val will be None ? What's happening under the hood? It seems to me very time the counter resumes to execute, it will

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Adam W.
I think learning a language from the documentation is an unreasonable expectation and burden for the authors. Buy a book, take a class, they are designed to provide you with a path from start to finish in a sensible manner, the documentation in my opinion is supposed to be a reference and a

Re: yield expression

2013-02-26 Thread Ian Kelly
On Tue, Feb 26, 2013 at 9:34 AM, Colin J. Williams c...@ncf.ca wrote: Perhaps it's becaoue (teild count) is a statement. Statements do not return a value. yield is a bit of an odd duck in that it's both a statement and an expression. Compare:

Re: groupby behaviour

2013-02-26 Thread Ian Kelly
On Tue, Feb 26, 2013 at 9:27 AM, andrea crotti andrea.crott...@gmail.com wrote: So I was trying to use groupby (which I used in the past), but I noticed a very strange thing if using list on the result: As stated in the docs: The returned group is itself an iterator that shares the

Re: IMAP4_SSL and OpenSSL compatibility

2013-02-26 Thread W. Martin Borgert
Quoting Antoine Pitrou solip...@pitrou.net: W. Martin Borgert debacle at debian.org writes: When I add an ssl_version argument to the call to ssl.wrap_socket() in imaplib.IMAP4_SSL.open(), I can connect to the Exchange server without problems: self.sslobj = ssl.wrap_socket(self.sock,

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Andrew Berg
On 2013.02.26 10:19, notbob wrote: zsh? What docs!? You mean other than the gigantic user manual? http://zsh.sourceforge.net/Doc/ -- CPython 3.3.0 | Windows NT 6.2.9200 / FreeBSD 9.1 -- http://mail.python.org/mailman/listinfo/python-list

Re: yield expression

2013-02-26 Thread Dave Angel
On 02/26/2013 11:34 AM, Colin J. Williams wrote: On 24/02/2013 7:36 PM, Ziliang Chen wrote: Hi folks, When I am trying to understand yield expression in Python2.6, I did the following coding. I have difficulty understanding why val will be None ? What's happening under the hood? It seems to me

Re: yield expression

2013-02-26 Thread Vytas D.
Hi, You are using yield incorrectly. yield works like return, but it can return more than once from the same function. Functions that yield produce a so called generator object. This generator object gives you values every time you call it. The generator works very interesting way. It starts

Re: groupby behaviour

2013-02-26 Thread andrea crotti
2013/2/26 Ian Kelly ian.g.ke...@gmail.com: On Tue, Feb 26, 2013 at 9:27 AM, andrea crotti andrea.crott...@gmail.com wrote: So I was trying to use groupby (which I used in the past), but I noticed a very strange thing if using list on the result: As stated in the docs: The returned group

python 3 problem: how to convert an extension method into a class Method

2013-02-26 Thread Robin Becker
In python 2 I was able to improve speed of reportlab using a C extension to optimize some heavily used methods. so I was able to do this class A: . def method(self,...): try: from extension import c_method import new A.method =

Re: Writing to same file from two threads

2013-02-26 Thread Paul Rubin
j...@toerring.de (Jens Thoms Toerring) writes: in garbled output (i.e. having some output from A inside a line written by B or vice versae) because the main thread or Yes they do get garbled like that. Preferred Python style is put a single thread in charge of all the i/o to that file, and

Re: groupby behaviour

2013-02-26 Thread Paul Rubin
andrea crotti andrea.crott...@gmail.com writes: It's very weird though this sharing and still doesn't really look rightl, is it done just for performance reasons? It could consume unbounded amounts of memory otherwise. E.g. if there are millions of items in the group. If you're not worried

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread MRAB
On 2013-02-26 14:26, Chris Angelico wrote: On Wed, Feb 27, 2013 at 12:56 AM, Roy Smith r...@panix.com wrote: When people ask PHP questions, the questions tend to be phrased as what do I type to get X, and the answers come back that way too. The forums are full of, I had the same problem.

Re: python 3 problem: how to convert an extension method into a class Method

2013-02-26 Thread Dave Angel
On 02/26/2013 12:21 PM, Robin Becker wrote: In python 2 I was able to improve speed of reportlab using a C extension to optimize some heavily used methods. so I was able to do this class A: That creates an old-style class in Python 2.x. They've been obsolete for many years. You want to

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread notbob
On 2013-02-26, Andrew Berg bahamutzero8...@gmail.com wrote: On 2013.02.26 10:19, notbob wrote: zsh? What docs!? You mean other than the gigantic user manual? http://zsh.sourceforge.net/Doc/ This document was generated by Simon Ruderich on July 24, 2012 'bout damn time!! ;) nb --

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Tim Chase
On 2013-02-26 17:54, notbob wrote: zsh? What docs!? You mean other than the gigantic user manual? http://zsh.sourceforge.net/Doc/ This document was generated by Simon Ruderich on July 24, 2012 'bout damn time!! ;) Generated...from source that has been around for ages:

Re: Python Newbie

2013-02-26 Thread rurpy
On 02/26/2013 01:32 AM, Larry Hudson wrote: On 02/24/2013 02:43 PM, piterrr.dolin...@gmail.com wrote: snip ... But for the moment I am trying to imitate familiar ground. snip This is EXACTLY why you're having trouble grasping Python. Python is a different language and requires a

Re: python 3 problem: how to convert an extension method into a class Method

2013-02-26 Thread Peter Otten
Robin Becker wrote: In python 2 I was able to improve speed of reportlab using a C extension to optimize some heavily used methods. so I was able to do this class A: . def method(self,...): try: from extension import c_method import new

Re: yield expression

2013-02-26 Thread Colin J. Williams
On 26/02/2013 12:07 PM, Vytas D. wrote: Hi, You are using yield incorrectly. yield works like return, but it can return more than once from the same function. Functions that yield produce a so called generator object. This generator object gives you values every time you call it. The generator

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Terry Reedy
On 2/26/2013 7:54 AM, Steven D'Aprano wrote: One week ago, JoePie91 wrote a blog post challenging the Python community and the state of Python documentation, titled: The Python documentation is bad, and you should feel bad.

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread notbob
On 2013-02-26, Tim Chase python.l...@tim.thechases.com wrote: which suggests that they've been actively maintained since 1999-2000 or so. in various guises, dating back to the man pages. Not all as thorough as the latest manual. Perhaps I shoulda qualified usable docs. ;) nb --

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Devin Jeanpierre
On Tue, Feb 26, 2013 at 11:38 AM, Adam W. awasile...@gmail.com wrote: I think learning a language from the documentation is an unreasonable expectation and burden for the authors. That's how I learned it. The Python tutorial, together with the stdlib reference manual, are often recommended to

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Mitya Sirenef
On 02/26/2013 07:54 AM, Steven D'Aprano wrote: One week ago, JoePie91 wrote a blog post challenging the Python community and the state of Python documentation, titled: The Python documentation is bad, and you should feel bad.

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread nn
On Feb 26, 11:19 am, notbob not...@nothome.com wrote: On 2013-02-26, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: The Python documentation is bad, and you should feel bad. Ahh!  A point at which I can interject. As a rank green python noob, I definitely hava an opinion on

Re: Python Newbie

2013-02-26 Thread Jean-Michel Pichavant
- Original Message - Hi guys, Question. Have this code intX = 32 # decl + init int var intX_asString = None # decl + init with NULL string var intX_asString = intX.__str__ ()# convert int to string What are these ugly underscores

Re: Python Newbie

2013-02-26 Thread Ethan Furman
On 02/26/2013 10:23 AM, ru...@yahoo.com wrote: On 02/26/2013 01:32 AM, Larry Hudson wrote: Python variables do NOT have any data type. I have no problem interpreting the OP's statement as meaning that he wanted to use a Python variable to consistently reference a particular type and wanted a

facebook

2013-02-26 Thread 23alagmy
facebook http://goo.gl/7nUIp -- http://mail.python.org/mailman/listinfo/python-list

Re: python 3 problem: how to convert an extension method into a class Method

2013-02-26 Thread Mark Lawrence
On 26/02/2013 18:38, Peter Otten wrote: Robin Becker wrote: In python 2 I was able to improve speed of reportlab using a C extension to optimize some heavily used methods. so I was able to do this class A: . def method(self,...): try: from extension

Re: nested loops

2013-02-26 Thread Anssi Saari
leonardo tampucciol...@libero.it writes: how can i have it print a row of stars beside each number, like this?: how many seconds?: 5 5 * * * * * 4 * * * * 3 * * * 2 * * 1 * blast off! You could use the repetition operator * since you have the number of repetitions needed in i.

Re: Python Newbie

2013-02-26 Thread Piterrr
Jean-Michel Pichavant jeanmic...@sequans.com wrote in message news:mailman.2567.1361905815.2939.python-l...@python.org... - Original Message - Hi guys, Question. Have this code intX = 32 # decl + init int var intX_asString = None # decl + init

Re: stmplib MIMEText charset weirdness

2013-02-26 Thread Terry Reedy
On 2/25/2013 11:00 PM, Adam W. wrote: Can someone explain to me why I can't set the charset after the fact. Email was revised to v.6 for 3.3, so the immediate answer to both your why questions is 'because email was not revised yet'. text = MIMEText('❤¥'.encode('utf-8'), 'html') In 3.3

Re: Writing to same file from two threads

2013-02-26 Thread Jens Thoms Toerring
Paul Rubin no.email@nospam.invalid wrote: j...@toerring.de (Jens Thoms Toerring) writes: in garbled output (i.e. having some output from A inside a line written by B or vice versae) because the main thread or Yes they do get garbled like that. Preferred Python style is put a single thread

Re: python 3 problem: how to convert an extension method into a class Method

2013-02-26 Thread Peter Otten
Mark Lawrence wrote: On 26/02/2013 18:38, Peter Otten wrote: Robin Becker wrote: In python 2 I was able to improve speed of reportlab using a C extension to optimize some heavily used methods. so I was able to do this class A: . def method(self,...):

Re: python 3 problem: how to convert an extension method into a class Method

2013-02-26 Thread Ethan Furman
On 02/26/2013 09:21 AM, Robin Becker wrote: In python 2 I was able to improve speed of reportlab using a C extension to optimize some heavily used methods. so I was able to do this class A: . def method(self,...): try: from extension import c_method

Re: python 3 problem: how to convert an extension method into a class Method

2013-02-26 Thread Peter Otten
Ethan Furman wrote: On 02/26/2013 09:21 AM, Robin Becker wrote: In python 2 I was able to improve speed of reportlab using a C extension to optimize some heavily used methods. so I was able to do this class A: . def method(self,...): try: from

Re: Python Newbie

2013-02-26 Thread Chris Angelico
On Wed, Feb 27, 2013 at 6:42 AM, Piterrr piotr...@optonline.net wrote: This reminds me, when I first started working with databases and saw an error msg which said that my query had ambiguous columns I laughed for 1/2 hr. I found it incredibly exitaining that a 100% deterministic piece of

Re: python 3 problem: how to convert an extension method into a class Method

2013-02-26 Thread Christian Heimes
Am 26.02.2013 21:19, schrieb Ethan Furman: Dumb question, but have you tried just assigning it? In Py3 methods are just normal functions... 8-- class A(): pass A.method = c_method 8-- That doesn't work with builtin functions because

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Rotwang
On 26/02/2013 12:54, Steven D'Aprano wrote: One week ago, JoePie91 wrote a blog post challenging the Python community and the state of Python documentation, titled: The Python documentation is bad, and you should feel bad.

Re: Python Newbie

2013-02-26 Thread rurpy
On Tuesday, February 26, 2013 11:59:51 AM UTC-7, Ethan Furman wrote: On 02/26/2013 10:23 AM, ru...@yahoo.com wrote: On 02/26/2013 01:32 AM, Larry Hudson wrote: Python variables do NOT have any data type. I have no problem interpreting the OP's statement as meaning that he wanted to use a

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Jason Swails
Just to throw in my 2c -- in the same way that 'a picture is worth a thousand words', an interactive interpreter is worth volumes of documentation (especially one with such a nice help()/__doc__ functionality). It's worth pointing out that 'interpreter' appears in the original rant once

Re: Small program ideas

2013-02-26 Thread eli m
On Monday, February 25, 2013 10:15:24 PM UTC-8, Dave Angel wrote: On 02/25/2013 10:48 PM, eli m wrote: On Friday, February 15, 2013 7:22:41 PM UTC-8, eli m wrote: Any small program ideas? I would prefer to stick to command line ones. Thanks. Thank you guys for the suggestions.

Re: Small program ideas

2013-02-26 Thread Joshua Landau
On 26 February 2013 22:47, eli m techgeek...@gmail.com wrote: How hard would it be to change one file to another and would it be a small-medium sized program? How do you want to change it? Like rename a file (os.rename)? -- http://mail.python.org/mailman/listinfo/python-list

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread emile
On 02/26/2013 11:00 AM, nn wrote: What it could have is better searching capability and a way to see more examples. Examples would clutter the documentation so maybe they should be collapsible, but you can never have enough examples. A good resource (although only covering up to v2.3) is

Re: Small program ideas

2013-02-26 Thread eli m
On Tuesday, February 26, 2013 4:22:10 PM UTC-8, Joshua Landau wrote: On 26 February 2013 22:47, eli m techg...@gmail.com wrote: How hard would it be to change one file to another and would it be a small-medium sized program? How do you want to change it? Like rename a file

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Mark Janssen
On Tue, Feb 26, 2013 at 4:54 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: There's no doubt that one of PHP's strengths, perhaps its biggest strength, is the good state of documentation. But should we feel bad about Python's docs? I don't think so at all. I think the

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Rick Johnson
On Tuesday, February 26, 2013 4:17:22 PM UTC-6, Jason Swails wrote: Just to throw in my 2c -- in the same way that 'a picture is worth a thousand words', an interactive interpreter is worth volumes of documentation (especially one with such a nice help()/__doc__ functionality). Yes! I don't

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Chris Angelico
On Wed, Feb 27, 2013 at 12:15 PM, Mark Janssen dreamingforw...@gmail.com wrote: On Tue, Feb 26, 2013 at 4:54 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: There's no doubt that one of PHP's strengths, perhaps its biggest strength, is the good state of documentation. But

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Jerome Covington
Hi I'm a Python enthusiast who originally found the Python docs at python.org to be one of the main reasons that my enthusiasm was fed. Also the thoughtful presence of docstrings throughout good projects and libraries gives me the feeling that finding out how to do something in Python is just as

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Terry Reedy
On 2/26/2013 1:52 PM, Devin Jeanpierre wrote: I would assert it isn't very kind to those even with basic fundamentals. For example, under precisely what circumstances does int() raise TypeError? You won't find that under either int's documentation, or TypeError's documentation, you have to

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Terry Reedy
On 2/26/2013 1:58 PM, Mitya Sirenef wrote: I think the issue with python documentation is that it ignores the 95/5 rule: 95% of people who land on a module's page are only looking for 5% of its information. So ideally it'd be separated in two different pages or two sections of the same page,

Re: yield expression

2013-02-26 Thread Dave Angel
On 02/26/2013 01:44 PM, Colin J. Williams wrote: On 26/02/2013 12:07 PM, Vytas D. wrote: Hi, You are using yield incorrectly. yield works like return, but it can return more than once from the same function. Functions that yield produce a so called generator object. This generator object gives

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Steven D'Aprano
On Tue, 26 Feb 2013 17:48:27 +, MRAB wrote: On 2013-02-26 14:26, Chris Angelico wrote: On Wed, Feb 27, 2013 at 12:56 AM, Roy Smith r...@panix.com wrote: When people ask PHP questions, the questions tend to be phrased as what do I type to get X, and the answers come back that way too.

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Mitya Sirenef
Subject: Re: Do you feel bad because of the Python docs? To: python-list@python.org Cc:Bcc: -=-=-=-=-=-=-=-=-=# Don't remove this line #=-=-=-=-=-=-=-=-=- On 02/26/2013 09:00 PM, Terry Reedy wrote: On 2/26/2013 1:58 PM, Mitya Sirenef wrote: I think the issue with python

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Rick Johnson
On Tuesday, February 26, 2013 7:48:51 PM UTC-6, Terry Reedy wrote: On 2/26/2013 1:52 PM, Devin Jeanpierre wrote: [...snip legit complaint...] Have you opened an issue, or checked for existing issue? I would be open to the idea that entries like that for int should not be overly type

Re: Small program ideas

2013-02-26 Thread Dave Angel
On 02/26/2013 05:47 PM, eli m wrote: On Monday, February 25, 2013 10:15:24 PM UTC-8, Dave Angel wrote: On 02/25/2013 10:48 PM, eli m wrote: On Friday, February 15, 2013 7:22:41 PM UTC-8, eli m wrote: Any small program ideas? I would prefer to stick to command line ones. Thanks.

Re: Do you feel bad because of the Python docs?

2013-02-26 Thread Mitya Sirenef
On 02/26/2013 10:09 PM, Mitya Sirenef wrote: (As a side note, I think it would be better if sections in datetime were in separate pages, it would be easier to google and the navbar on the left side is very crowded and rather hard to read - often I find myself missing stuff that's in there

Re: python 3 problem: how to convert an extension method into a class Method

2013-02-26 Thread Steven D'Aprano
On Tue, 26 Feb 2013 17:21:16 +, Robin Becker wrote: In python 2 I was able to improve speed of reportlab using a C extension to optimize some heavily used methods. so I was able to do this class A: . def method(self,...): try: from extension

Re: Small program ideas

2013-02-26 Thread Chris Angelico
On Wed, Feb 27, 2013 at 2:27 PM, Dave Angel da...@davea.name wrote: But to convert a DOS text file (with lines ending cr/lf) into a Unix text file (with lines ending lf) would be a dozen lines, shrinkable to 3 with lots of experience. (And I'd probably prefer the dozen line version) Code

Searching for a replacement for PIL

2013-02-26 Thread Thorsten Kiefer
Hi, my actual program imports ImageTk, to generate TK compatible images. But it seems like PIL is no longer supported. Is there a replacement for draw Images at high rates into TKinter GUIs ? Best regards Thorsten -- http://mail.python.org/mailman/listinfo/python-list

Re: Searching for a replacement for PIL

2013-02-26 Thread Chris Rebert
On Tue, Feb 26, 2013 at 10:17 PM, Thorsten Kiefer thorstenkie...@gmx.de wrote: Hi, my actual program imports ImageTk, to generate TK compatible images. But it seems like PIL is no longer supported. Have you investigated the Pillow fork? https://pypi.python.org/pypi/Pillow/ Cheers, Chris --

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2013-02-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset f3f23ecdb1c6 by Serhiy Storchaka in branch '2.7': Issue #13555: Fix an integer overflow check. http://hg.python.org/cpython/rev/f3f23ecdb1c6 -- ___ Python tracker rep...@bugs.python.org

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2013-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for the report. Standard tests do not cover pickling/unpickling to real files. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13555 ___

[issue17298] Twisted test failure triggered by change in 2.7 branch

2013-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If this is a duplicate, it should be fixed by f3f23ecdb1c6. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17298 ___

[issue17299] Test cPickle with real files

2013-02-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently cPickle module tested only with cStringIO.StringIO. However cPickle uses different code for cStringIO.StringIO, for file objects, and for general IO streams (i.e. io.BytesIO). Last two cases are not covered by tests. -- components: Tests

[issue16932] urlparse fails at parsing www.python.org:80/

2013-02-26 Thread Senthil Kumaran
Senthil Kumaran added the comment: I am noticing this one late. Sorry for that. I agree that this is docs issue and I would like to fix it in this way. Give the doc example as: urlparse('www.cwi.nl/%7Eguido/Python.html') ParseResult(scheme='', netloc='',

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2013-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have opened issue17299 for testing issue. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13555

[issue14468] Update cloning guidelines in devguide

2013-02-26 Thread Ezio Melotti
Ezio Melotti added the comment: I went through all the messages on this issue, and I'll address them here. There's enough material for two new issues (advanced FAQs, and improvements about Windows docs), and a few minor issues that can be discussed and fixed as part of this issues before

[issue12641] Remove -mno-cygwin from distutils

2013-02-26 Thread Martin Fiers
Martin Fiers added the comment: This also affects our software. I agree with Dan (danmbox): I don't understand; so many people depend on it and yet an out-of-the-box solution doesn't work. I don't want to break the distutils package of our users because we use mingw. Within one Python script,

[issue17263] crash when tp_dealloc allows other threads

2013-02-26 Thread Charles-François Natali
Charles-François Natali added the comment: And here's a patch. -- keywords: +patch Added file: http://bugs.python.org/file29244/thread_local_concurrent.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17263

[issue15034] Document best practices for exceptions

2013-02-26 Thread Ezio Melotti
Ezio Melotti added the comment: I'm removing the devguide component and update the title accordingly. -- components: +Documentation -Devguide title: Devguide should document best practices for stdlib exceptions - Document best practices for exceptions

  1   2   >