[issue4541] Add str method for removing leading or trailing substrings

2008-12-04 Thread Zach Hirsch
New submission from Zach Hirsch <[EMAIL PROTECTED]>: I've found that having a way to strip a leading substring from a string is convienent. I've also gotten bitten by the fact that str.strip takes a sequence of characters to remove from the beginning -- not a full string. I

[issue4541] Add str method for removing leading or trailing substrings

2008-12-04 Thread Zach Hirsch
Zach Hirsch <[EMAIL PROTECTED]> added the comment: Thanks for taking a look. Yea, it's pretty easy to write it in Python, but I've found that I've needed it in quite a few things that I've worked on, so I thought it might be useful in Python itself. I've updated

[issue4541] Add str method for removing leading or trailing substrings

2008-12-05 Thread Zach Hirsch
Zach Hirsch <[EMAIL PROTECTED]> added the comment: Sounds good to me, except for one thing: define "sensible". To me, lstrips seems sensible, since it's a recurring pattern that I've used in multiple locations. But perhaps my sens

[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-01-18 Thread Zach Hirsch
Zach Hirsch added the comment: Without msvc9compiler_stripruntimes.diff, or a patch like it, it doesn't seem possible to use pywin32 (or other binary extensions) with Python-2.6+ installed "just for me" (i.e., without the VC90 runtime installed globally). Using the python-2.6.

[issue2889] curses for windows (alternative patch)

2009-01-25 Thread Zach Hirsch
Zach Hirsch added the comment: Here's a patch against the head of trunk that adds vcproj files for _curses and _curses_panel, modifies (slightly) the test suite and _cursesmodule.c (again, slightly) to get Python to work with pdcurses on windows. I also added a blurb to PCbuild\readm

[issue5447] future unicode literals and r'\u'

2009-03-09 Thread Zach Hirsch
Zach Hirsch added the comment: I've hit this, too, and it's annoyed me. So here's a patch against trunk that should fix it. The idea is: whenever unicode_literals are turned on (or the -U command line flag is passed), to convert r"\u" to "\u005c\u0075" an

[issue2889] curses for windows (alternative patch)

2009-03-09 Thread Zach Hirsch
Zach Hirsch added the comment: > * test_curses: I'd be happier to see the 'if' statement as sys.platform > != 'win32' and (not term or term == 'unknown') -- easier to read. OK, fixed. > * test_curses: does putp() make PDCurses crash, or is it no

[issue2622] Import errors in email.message.py

2009-05-12 Thread Zach Hirsch
Zach Hirsch added the comment: I'm not sure if this is the same problem, but it seems related. I can get the same ImportError without involving py2exe or modulefinder: Python 2.5.4 (r254:67916, Feb 18 2009, 03:00:47) [GCC 4.3.3] on linux2 Type "help", "copyright", &