Re: [Python-Dev] Adding the 'path' module (was Re: Some RFEforreview)
On Wed, 29 Jun 2005, Tony Meyer wrote: > Maybe this has already been answered somewhere (although I don't > recall seeing it, and it's not in the sourceforge tracker) but has > anyone asked Jason Orendorff what his opinion about this (including > the module in the stdlib) is? I e-mailed Jason earlier this week before submitting the RFE. He said that "I'd like to see path (or something like it) in the standard library." He also said he didn't have time to write a PEP at the moment, but that I should feel free to do so. As for me, I'm happy for Reinhold to do it if he wants. -- Michael Hoffman <[EMAIL PROTECTED]> European Bioinformatics Institute ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)
Guido van Rossum wrote: > > By the way, it also occurs to me that for the sake of subclassability, the > > methods should not return 'path(somestr)' when creating new objects, but > > instead use self.__class__(somestr). > > Clearly it needs a PEP. I haven't read the rest of the thread Once, there was a path-related pre-PEP. http://topjaklont.student.utwente.nl/creaties/path/pep-.html It was never finished, nor am I working on it, but it's public domain. Just wanted to remind potential PEP-authors. regards, Gerrit. -- Weather in Twenthe, Netherlands 29/06 10:55: 18.0°C Few clouds mostly cloudy wind 1.3 m/s None (57 m above NAP) -- In the councils of government, we must guard against the acquisition of unwarranted influence, whether sought or unsought, by the military-industrial complex. The potential for the disastrous rise of misplaced power exists and will persist. -Dwight David Eisenhower, January 17, 1961 ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] using pyhon from the MSYS shell
I was trying to compile a python plugin (for gimp) using the MSYS shell and the MINGW compiler. I now have put this in 'sitecustomize' $ cat /c/Python24/lib/site-packages/sitecustomize.py import sys import os import re if os.environ.get("MSYSTEM") == "MINGW32": os.sep='/' os.pathsep='/' sys.prefix = re.sub('','/',sys.prefix) sys.exec_prefix = re.sub('','/',sys.exec_prefix) It would probably be better to have python detect that it's running from inside the msys shell, and output '/'es instead of '\'es. maybe someone could extend os.path to do this in the standard distribution: implement an msyspath.py, which calls ntpath for each function, and does a replace at the end of the evaluation. Unfortunately, I'm just starting to look into python, so I do not know what the cleanest implementation of this would be... ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] getch() in msvcrt does not accept extended characters.
Hi all, Please CC: me on any replies as I am not subscribed to this list. I am the lead maintainer for the ntlmaps project (http://ntlmaps.sourceforge.net). Recently a bugreport logged against ntlmaps has brought an issue to my attention (see: https://sourceforge.net/tracker/index.php?func=detail&aid=1224877&group_id=69259&atid=523935). The getpass() function in module getpass does not accept extended characters on Windows. On Windows, the getpass() source uses the msvcrt module to capture one character at a time from stdin via the _getch() function defined in conio.h. Microsoft support capturing extended characters via _getch (see: http://support.microsoft.com/default.aspx?scid=kb;en-us;57888), but it requires making a second call to getch() if one of the 'magic' returns is encountered in the first call (0x00 or 0xE0). The relevant chunk of code in Python that would probably need to be changed to support this appears to be in msvcrtmodule.c: static PyObject * msvcrt_getch(PyObject *self, PyObject *args) { int ch; char s[1]; if (!PyArg_ParseTuple(args, ":getch")) return NULL; Py_BEGIN_ALLOW_THREADS ch = _getch(); Py_END_ALLOW_THREADS s[0] = ch; return PyString_FromStringAndSize(s, 1); } It would seem that it could be made to support extended characters by changing it to: static PyObject * msvcrt_getch(PyObject *self, PyObject *args) { int ch; char s[1]; if (!PyArg_ParseTuple(args, ":getch")) return NULL; Py_BEGIN_ALLOW_THREADS ch = _getch(); +if (ch == 0x00 || ch == 0XE0) +ch = _getch(); Py_END_ALLOW_THREADS s[0] = ch; return PyString_FromStringAndSize(s, 1); } I haven't yet read the code for PyString_FromStringAndSize(), but presumably it can coerce unicode/extended results out of the int (or could be made to)? What are the chances of modifying msvcrt_getch() to support extended chars? The unix_getpass() seems to already work OK with extended characters, so this would ~seem~ to be a logical extension to the Windows version. Thoughts? -- Darryl Dixon <[EMAIL PROTECTED]> ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] getch() in msvcrt does not accept extended characters.
Darryl Dixon wrote: > Microsoft support capturing extended characters via _getch, but it requires > making a > second call to getch() if one of the 'magic' returns is encountered in the > first call (0x00 > or 0xE0). so why not do that in your python code? > The relevant chunk of code in Python that would probably need to be > changed to support this appears to be in msvcrtmodule.c: if you change msvcrt, you'll break all the programs that uses getch() in the prescribed way... ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] using pyhon from the MSYS shell
On Tue, Jun 28, 2005, lode leroy wrote: > > I was trying to compile a python plugin (for gimp) using the MSYS > shell and the MINGW compiler. python-dev is the wrong place for this question; please start with comp.lang.python (or find another suitable place). -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ f u cn rd ths, u cn gt a gd jb n nx prgrmmng. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] New python developer
Hello, I'm using Python for about 2 years, and I would like to go further in python developement. So that's why I've subscribed to python-dev. And since I'm not very good in C, I think I will try to help and to submit patchs in pure python. -- Fabien SCHWOB (and sorry for my english but it's not my mother tongue) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] New python developer
On 6/29/05, Fabien <[EMAIL PROTECTED]> wrote: > I'm using Python for about 2 years, and I would like to go further in > python developement. So that's why I've subscribed to python-dev. And > since I'm not very good in C, I think I will try to help and to submit > patchs in pure python. I'm not good in C neither, but there's always work to do (not only coding, but also reviewing bugs, patchs, or dealing with documentation). You're more than welcomed. If I can help you with anything, just let me know. .Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/ ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] New python developer
On Wed, Jun 29, 2005, Fabien wrote: > > I'm using Python for about 2 years, and I would like to go further in > python developement. So that's why I've subscribed to python-dev. And > since I'm not very good in C, I think I will try to help and to submit > patchs in pure python. > > -- > Fabien SCHWOB (and sorry for my english but it's not my mother tongue) Welcome! Your English is just fine. If you haven't yet, take a look at http://www.python.org/dev/ Pay particular attention to "Why Develop Python?" and "Intro to Development". -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ f u cn rd ths, u cn gt a gd jb n nx prgrmmng. ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Adding the 'path' module (was Re: Some RFEforreview)
Michael Hoffman wrote: > On Wed, 29 Jun 2005, Tony Meyer wrote: > >> Maybe this has already been answered somewhere (although I don't >> recall seeing it, and it's not in the sourceforge tracker) but has >> anyone asked Jason Orendorff what his opinion about this (including >> the module in the stdlib) is? > > I e-mailed Jason earlier this week before submitting the RFE. He said > that "I'd like to see path (or something like it) in the standard > library." He also said he didn't have time to write a PEP at the > moment, but that I should feel free to do so. > > As for me, I'm happy for Reinhold to do it if he wants. Well, as it is your RFE... ;) I'm not eager to write a PEP right now, though I think I said so in a post. I just wanted to start a discussion here, so that you can write a better PEP . Reinhold -- Mail address is perfectly valid! ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] floatobject.c 2.136
I'm getting a compiler warning from your checkin: C:\py25\Objects\floatobject.c(1430) : warning C4244: 'initializing' : conversion from 'double ' to 'float ', possible loss of data ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] floatobject.c 2.136
"Raymond Hettinger" <[EMAIL PROTECTED]> writes: > I'm getting a compiler warning from your checkin: "your"? Mine? > C:\py25\Objects\floatobject.c(1430) : warning C4244: 'initializing' : > conversion from 'double ' to 'float ', possible loss of data That's this line: float y = x; where x is of double type. This seems an, um, daft warning to me, but it's easy to fix, and I've fixed it. Cheers, mwh -- The only problem with Microsoft is they just have no taste. -- Steve Jobs, (From _Triumph of the Nerds_ PBS special) and quoted by Aahz on comp.lang.python ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] Weekly Python Patch/Bug Summary
Patch / Bug Summary ___ Patches : 344 open ( +6) / 2875 closed ( +9) / 3219 total (+15) Bugs: 897 open (-17) / 5094 closed (+34) / 5991 total (+17) RFE : 191 open ( +3) / 170 closed ( +0) / 361 total ( +3) New / Reopened Patches __ fileinput openfile patch, bz2fileinput (2005-06-22) http://python.org/sf/1225466 opened by Stephan Boettcher Proposal to implement comment rows in csv module (2005-06-22) http://python.org/sf/1225769 opened by Iain Haslam Patch for (Doc) bug #1217513 (2005-06-25) CLOSED http://python.org/sf/1227442 opened by Peter van Kampen Patch for (Doc) bug #1225705 (2005-06-25) CLOSED http://python.org/sf/1227444 opened by Peter van Kampen Patch for (Doc) bug #1175022 (2005-06-25) CLOSED http://python.org/sf/1227489 opened by Peter van Kampen Patch for (Doc) bug #1186072 (2005-06-25) CLOSED http://python.org/sf/1227495 opened by Peter van Kampen Patch for (Doc) bug #1166582 (2005-06-25) CLOSED http://python.org/sf/1227513 opened by Peter van Kampen Patch for (Doc) bug #1212195 (2005-06-26) http://python.org/sf/1227545 opened by Peter van Kampen Patch for (Doc) bug #1219273 (2005-06-26) http://python.org/sf/1227568 opened by Peter van Kampen Patch for (Doc) bug #1228904 (2005-06-29) http://python.org/sf/1229935 opened by Peter van Kampen solaris 10 should not define _XOPEN_SOURCE_EXTENDED (2005-06-27) http://python.org/sf/1227966 opened by Bill Clarke code.py use sys.excepthook to display exceptions (2005-06-27) http://python.org/sf/1228112 opened by Miki Tebeka optionally allow mutable builtin types (2005-06-28) http://python.org/sf/1229239 opened by Greg Couch optionally allow mutable builtin types (2005-06-28) CLOSED http://python.org/sf/1229280 opened by Greg Couch Zipfile fix create_system information (2005-06-29) http://python.org/sf/1229511 opened by Hendrik Muhs Patches Closed __ Building on Mac OS X 10.1 (2004-01-02) http://python.org/sf/869555 closed by mwh httplib mentions getreply instead of getresponse (2005-05-16) http://python.org/sf/1203094 closed by birkenfeld note that os.chown can have -1 as an argument (2005-06-01) http://python.org/sf/1213031 closed by birkenfeld Patch for (Doc) bug #1217513 (2005-06-25) http://python.org/sf/1227442 closed by birkenfeld Patch for (Doc) bug #1225705 (2005-06-25) http://python.org/sf/1227444 closed by birkenfeld Patch for (Doc) bug #1175022 (2005-06-25) http://python.org/sf/1227489 closed by birkenfeld Patch for (Doc) bug #1186072 (2005-06-25) http://python.org/sf/1227495 closed by birkenfeld Patch for (Doc) bug #1166582 (2005-06-25) http://python.org/sf/1227513 closed by birkenfeld cgitb: make more usable for 'binary-only' sw (new patch) (2005-02-19) http://python.org/sf/1144549 closed by birkenfeld optionally allow mutable builtin types (2005-06-28) http://python.org/sf/1229280 closed by gregcouch New / Reopened Bugs ___ crash in gcmodule.c on python reinitialization (2005-06-22) http://python.org/sf/1225584 opened by Alexander Miseler os.environ documentation should mention unsetenv (2005-06-22) CLOSED http://python.org/sf/1225705 opened by Brian Wellington SimpleXMLRPCServer example is broken (2004-10-06) http://python.org/sf/1041501 reopened by kjohnson Can't take sequence slice past 32K (2005-06-23) CLOSED http://python.org/sf/1226404 reopened by tim_one Can't take sequence slice past 32K (2005-06-23) CLOSED http://python.org/sf/1226404 opened by Gene Cash cPickle and pickle dump bug (inf float) (2005-06-24) CLOSED http://python.org/sf/1226955 opened by Andrea Bolzonella segfault in os module (2005-06-24) http://python.org/sf/1226969 opened by jacobo_es Queue class does not inherit object (2005-06-24) CLOSED http://python.org/sf/1227166 opened by Vincent Côté-Roy CGIXMLRPCRequestHandler example uses nonexistant "div()" (2005-06-24) CLOSED http://python.org/sf/1227181 opened by Danny Yoo Two requests to one file are not done in parallel (2005-06-25) http://python.org/sf/1227480 opened by Markus Franz subprocess: inheritance of std descriptors inconsistent (2005-06-26) http://python.org/sf/1227748 opened by André Malo shelve/bsddb crash on db close (2005-06-26) http://python.org/sf/1227955 opened by Scott cPickle and pickle dump bug (inf float) (2005-06-27) CLOSED http://python.org/sf/1228015 opened by Andrea Bolzonella usage of type "char*" instead of "const char*" (2005-06-27) http://python.org/sf/1228053 opened by Mattias Ekholm update to 7.15 zlib & 7.18.1 ZipFile Objects docs (2005-06-28) CLOSED http://python.org/sf/1228830 opened by Brian vdB weakref example broken (2005-06-28) http://python.org/sf