[Python-Dev] OT pet peeve (was: Re: str.dedent)

2005-11-13 Thread Nicola Larosa
Sorry, I didn't mean to mislead. I wrote easily - I guess using the current textwrap.dedent isn't really hard, but still, writing: import textwrap r = some_func(textwrap.dedent('''\ line1 line2''')) Seems

Re: [Python-Dev] Is some magic required to check out new files from svn?

2005-11-13 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: I read the developer's FAQ and the output of svn up --help. Executing svn up or svn info tells me I'm already at rev 41430, which is the latest rev, right? Creating a fresh build subdirectory followed by configure and make gives me this error:

Re: [Python-Dev] Is some magic required to check out new files from svn?

2005-11-13 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: Is there some magic required to check out new files from the repository? I'm trying to build on the trunk and am getting compilation errors about code.h not being found. If I remember correctly, this is a new file brought over from the ast branch. Using cvs I would

[Python-Dev] Implementation of PEP 341

2005-11-13 Thread Thomas Lee
Hi all, I've been using Python for a few years and, as of a few days ago, finally decided to put the effort into contributing code back to the project. I'm attempting to implement PEP 341 (unification of try/except and try/finally) against HEAD. However, this being my first attempt at a

Re: [Python-Dev] Implementation of PEP 341

2005-11-13 Thread Nick Coghlan
Thomas Lee wrote: Hi all, I've been using Python for a few years and, as of a few days ago, finally decided to put the effort into contributing code back to the project. I'm attempting to implement PEP 341 (unification of try/except and try/finally) against HEAD. However, this being

Re: [Python-Dev] Is some magic required to check out new files from svn?

2005-11-13 Thread skip
../Objects/frameobject.c:6:18: code.h: No such file or directory Sure enough, I have no code.h in my Include directory. Fredrik what does Fredrik svn status Include/code.h Fredrik say? if it says It reports nothing. Fredrik doing a full Fredrik

Re: [Python-Dev] Is some magic required to check out new files from svn?

2005-11-13 Thread John J Lee
On Sat, 12 Nov 2005 [EMAIL PROTECTED] wrote: [...] Before I wipe out Include and svn up again is there any debugging I can do for someone smarter in the ways of Subversion than me? Regarding my [...] Output of the svnversion command? That shows switched and locally modified files, etc. I'm

Re: [Python-Dev] Is some magic required to check out new files from svn?

2005-11-13 Thread skip
Martin code.h should live in Include. It was originally committed to Martin CVS, so it is in the subversion repository from day one; it Martin should always have been there since you started using Martin subversion. Sorry, I had some strange idea it was new with the ast branch.

Re: [Python-Dev] Is some magic required to check out new files from svn?

2005-11-13 Thread skip
John Output of the svnversion command? That shows switched and locally John modified files, etc. John I'm not an svn guru, but I find that command useful, especially to John point out when I switched some deep directory then forgot about John it. Thanks, I'll remember it

Re: [Python-Dev] Is some magic required to check out new files from svn?

2005-11-13 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: Martin code.h should live in Include. It was originally committed to Martin CVS, so it is in the subversion repository from day one; it Martin should always have been there since you started using Martin subversion. Sorry, I had some strange idea it

Re: [Python-Dev] Event loops, PyOS_InputHook, and Tkinter

2005-11-13 Thread Martin v. Löwis
Michiel Jan Laurens de Hoon wrote: I have an extension module for scientific visualization. This extension module opens one or more windows, in which plots can be made. Something similar to the plotting capabilities of Matlab. For the graphics windows to remain responsive, I need to make

Re: [Python-Dev] Event loops, PyOS_InputHook, and Tkinter

2005-11-13 Thread Martin v. Löwis
Mark Hammond wrote: : Currently, event loops are available in Python via PyOS_InputHook, a : pointer to a user-defined function that is called when Python is idle : (waiting for user input). However, an event loop using PyOS_InputHook : has some inherent limitations, so I am thinking about how

Re: [Python-Dev] str.dedent

2005-11-13 Thread Alexander Kozlovsky
Raymond Hettinger wrote: That is somewhat misleading. We already have that ability. What is being proposed is moving existing code to a different namespace. So the motivation is really something like: I want to write s = s.dedent() because it is too painful to write

Re: [Python-Dev] Is some magic required to check out new files from svn?

2005-11-13 Thread Nick Coghlan
Martin v. Löwis wrote: [EMAIL PROTECTED] wrote: Martin I would also recommend to throw away the sandbox completely and Martin check it out from scratch. Please report whether this gives you Martin code.h. Yes, it does (still with my built-from-source 1.2.3). Ok. I am now

Re: [Python-Dev] Implementation of PEP 341

2005-11-13 Thread Nick Coghlan
Thomas Lee wrote: Implemented as you suggested and tested. I'll submit the patch to the tracker on sourceforge shortly. Are you guys still after contextual diffs as per the developer pages, or is an svn diff the preferred way to submit patches now? svn diff should be fine. Although I

Re: [Python-Dev] str.dedent

2005-11-13 Thread M.-A. Lemburg
Noam Raphael wrote: Following Avi's suggestion, can I raise this thread up again? I think that Reinhold's .dedent() method can be a good idea after all. The idea is to add a method called dedent to strings. It would do exactly what the current textwrap.indent function does. You are missing

Re: [Python-Dev] str.dedent

2005-11-13 Thread Antoine Pitrou
You are missing a point here: string methods were introduced to make switching from plain 8-bit strings to Unicode easier. Is it the only purpose ? I agree with the OP that using string methods is much nicer and more convenient than having to import separate modules. Especially, it is nice to

[Python-Dev] ast status, memory leaks, etc

2005-11-13 Thread Neal Norwitz
There's still more clean up work to go, but the current AST is hopefully much closer to the behaviour before it was checked in. There are still a few small memory leaks. After running the test suite, the total references were around 380k (down from over 1,000k). I'm not sure exactly what the

Re: [Python-Dev] Building Python with Visual C++ 2005 ExpressEdition

2005-11-13 Thread Neil Hodgson
Martin v. Löwis: The problem (for me, atleast) is that VC is so much more convenient to work with. In my experience Visual C++ has always produced faster, more compact code than Mingw. While this may not be true with current releases, I'd want to ensure that the normal Python download for

Re: [Python-Dev] Implementation of PEP 341

2005-11-13 Thread Brett Cannon
On 11/13/05, Nick Coghlan [EMAIL PROTECTED] wrote: Thomas Lee wrote: Implemented as you suggested and tested. I'll submit the patch to the tracker on sourceforge shortly. Are you guys still after contextual diffs as per the developer pages, or is an svn diff the preferred way to submit

Re: [Python-Dev] Event loops, PyOS_InputHook, and Tkinter

2005-11-13 Thread Michiel Jan Laurens de Hoon
Martin v. Löwis wrote: Michiel Jan Laurens de Hoon wrote: The problem with threading (apart from potential portability problems) is that Python doesn't let us know when it's idle. This would cause excessive repainting (I can give you an explicit example if you're interested). I don't

Re: [Python-Dev] Event loops, PyOS_InputHook, and Tkinter

2005-11-13 Thread Greg Ewing
Noam Raphael wrote: On 11/13/05, Greg Ewing [EMAIL PROTECTED] wrote: Noam Raphael wrote: callback. Then, when the interpreter is idle, it will call all the registered callbacks, one at a time, and everyone would be happy. Except for those who don't like busy waiting. I'm not

Re: [Python-Dev] Event loops, PyOS_InputHook, and Tkinter

2005-11-13 Thread Fernando Perez
Michiel Jan Laurens de Hoon wrote: For an extension module such as PyGtk, the developers may decide that PyGtk is likely to be run in non-interactive mode only, for which the PyGtk mainloop is sufficient. Did you read my reply? ipython, based on code.py, implements a few simple threading

Re: [Python-Dev] Event loops, PyOS_InputHook, and Tkinter

2005-11-13 Thread Josiah Carlson
I personally like Edward Loper's idea of just running your own event handler which deals with drawing, suspend/resume, etc... If, however, Python contains an event loop that takes care of events as well as Python commands, redrawing won't happen until Python has executed all plot commands