Re: Unicode & Pythonwin / win32 / console?

2006-01-13 Thread Martin v. Löwis
Robert wrote: > * Webbrowsers for example have to display defective HTML as good as > possible, unknown unicode chars as "?" and so on... Users got very > angry in the beginning of browsers when 'strict' programmers displayed > their exception error boxes ... Right. If you would develop a webbrows

Re: different versions for 2.3.4 documentation

2006-01-13 Thread Martin v. Löwis
Manlio Perillo wrote: >> It appears that the latex-* set really comes from the 2.4 branch, >> somehow. That must be a mistake. >> > > Well, the same happens for 2.3.5... > And I still don't have checked 2.4.x releases. OTOH, 2.3 is not maintained anymore, so it is doubtful that anything will be d

Re: Is the Python binding for ncurses unicode capable?

2006-01-18 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > I can't tell from the documentation, but I'd like to try and print > unicode characters through Python's binding to ncurses. From reading > the documentation on the curses module, it doesn't appear that this is > possible: > > http://python.org/doc/2.4.2/lib/module-curse

Re: socket.ssl with key files?

2006-01-18 Thread Martin v. Löwis
Chris Curvey wrote: > I see that socket.ssl takes "keyfile" and "certfile" parameters. So do > I just take the text file that I've been given and break it into two > files, then specify those file names when I open the connection? This might help, or it might not. If you have a passphrase on the

Re: socket.ssl with key files?

2006-01-19 Thread Martin v. Löwis
Chris Curvey wrote: > 1) Am I correct that I should just be splitting the files? Nobody knows. Just try it and report whether it works. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: XML SAX parser bug?

2006-01-19 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > but how do I detect that the parser has split up the characters? I gues > I need to detect it in order to reconstruct the complete string Don't try to detect it. Instead, assume it always happens, and collect the strings in characters(), rather than processing them. Do s

Re: Is the Python binding for ncurses unicode capable?

2006-01-19 Thread Martin v. Löwis
Brian McNally wrote: > Thanks for responding to my question. I'm still a little confused > though. How can I encode unicode strings as UTF-8? My terminal does > support UTF-8, but from looking at Python's ncurses API, it looks like > all of the methods for displaying characters want an ASCII code (

Re: Python on an embedded platform

2006-01-19 Thread Martin v. Löwis
Derek wrote: > Does anybody have advice? I am looking for any tricks, features I can > disable, etc so I can get the python core to be a small as possible (<100k > would be good). Please start with describing how far you got. What did you already do, and how far did it get you? My first recomme

Re: Is the Python binding for ncurses unicode capable?

2006-01-19 Thread Martin v. Löwis
Thomas Dickey wrote: >>ncurses expects byte strings (although I'm uncertain as to what >>impact multi-byte encodings have in ncurses). > > > It depends on whether python's curses binding is linked with the > wide-character > flavor (ncursesw) or the normal one. If it's linked with ncursesw, str

Re: Is the Python binding for ncurses unicode capable?

2006-01-20 Thread Martin v. Löwis
Thomas Dickey wrote: > Both libraries respond to locale. But ncurses only deals in single-byte > encodings, e.g., ISO-8859-1 through ISO-8859-15. ncursesw supports that, > but adds support for multi-byte encodings, e.g., UTF-8. For the latter, > one can also have characters that combine (a print

Re: Is the Python binding for ncurses unicode capable?

2006-01-20 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > I don't have any problems with simply printing the characters from > Python (outside of ncurses), but using the ncurses functions for > printing these characters is problematic. I see. I can't get this to work, either, and neither with libncursesw. Regards, Martin -- h

Re: Python-2.5beta1 crash

2006-07-11 Thread Martin v. Löwis
for (i = PyTuple_GET_SIZE(tuple); --i >= 0; ) { PyObject *v = PyTuple_GET_ITEM(tuple, i); if (v == NULL || !PyString_CheckExact(v)) { Py_FatalError("non-string found in code slot"); } PyString_Int

Re: Python for Embedded Systems?

2006-07-16 Thread Martin v. Löwis
Carl J. Van Arsdall wrote: > This raises a good question. Is there a need for python to change > somewhat to work better in an embedded profile? When I asked this question last on python-dev, there was exactly one response, and that was "yes, it needs to change". The natural question then is "

Re: getaddrinfo not found on SCO OpenServer 5.0.5

2006-07-22 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > 1) I've seen mention of native vs. Python getaddrinfo implementations. > If that's true, how can I force the program to use the Python one? > > 2) Is there an option to not use the BSD Library function? > > 3) Finally, is there a trick to searching for shared libaries?

Re: Compiler for external modules for python

2006-07-22 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > Under this circumstances I tried to find the VC7 compiler from > microsoft sites, however it deflect to the new version of VS2005, so I > "lost the cord and the goat" . > I do not know what to do. Does anybody has some guidelines about this > matter? You need to use VS 2

Re: Generating all possible combination of elements in a list

2006-07-23 Thread Martin v. Löwis
Mir Nazim wrote: > Example Problem: > > Generate all possible permutations for > [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2] > > [1, 2, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2] (notice an extra 2 ) > > eliminate some combinations based on some conditions and combine the > rest of combinations. And now generate al

Re: Grail not downloading

2006-07-23 Thread Martin v. Löwis
Dustan wrote: > Does anybody know anything about Grail? I've been unable to get at > it, and I've tried on both Windows and Macintosh machines. > > http://grail.sourceforge.net/ The files just don't exist, physically, on the server (if you have an SF account, you can check this yourself). Howev

Re: Generating all possible combination of elements in a list

2006-07-25 Thread Martin v. Löwis
Mir Nazim wrote: > condition are there cannot be more than 3 consecutive 2's or 1's > >> If the task is to produce all distinct permutations of 6 occurrences >> of 1 and 6 occurrences of 2, I suggest the program below. It needs >> produces much fewer than 12! results (namely, 924). >> > > Yes tha

Re: Grail not downloading

2006-07-25 Thread Martin v. Löwis
Dustan wrote: > I appreciate the info. I couldn't exactly attempt to download the files > manually, though. ;) Learn to use CVS, then go to http://sourceforge.net/cvs/?group_id=6416 Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: builtin function compile exceptions thrown?

2006-07-27 Thread Martin v. Löwis
James Thiele wrote: > What exceptions (if any) can the python builtin compile() function > throw besides SyntaxError? - TypeError, if the parameters are wrong/too many/too few - Any errors that a codec may raise, if there is an encoding declaration, plus (pre 2.5) MemoryError if the encoding is

Re: Unicode question

2006-07-28 Thread Martin v. Löwis
Ben Edwards (lists) wrote: > Firstly sys.setdefaultencoding('iso−8859−1') does not work, I have to do > sys.setdefaultencoding = 'iso−8859−1' That "works", but has no effect. You bind the variable sys.setdefaultencoding to some value, but that value is never used for anything (do sys.getdefaultenc

Re: install python on cdrom

2006-07-30 Thread Martin v. Löwis
Fabian Braennstroem schrieb: > I look for an easy way to use the newest scipy, pyvtk, matplotlib, > f2py, numpy, paraview/vtk,... on a entreprise redhat machine > without administration rights. > My first thought was to install the whole new python system > on a cdrom/dvd and mounting it, when I ne

Re: ElementTree and Unicode

2006-08-02 Thread Martin v. Löwis
Sébastien Boisgérault schrieb: > I am trying to embed an *arbitrary* (unicode) strings inside > an XML document. Of course I'd like to be able to reconstruct > it later from the xml document ... If the naive way to do it does > not work, can anyone suggest a way to do it ? XML does not support arb

Re: ElementTree and Unicode

2006-08-02 Thread Martin v. Löwis
Sébastien Boisgérault schrieb: > I am trying to embed an *arbitrary* (unicode) strings inside > an XML document. Of course I'd like to be able to reconstruct > it later from the xml document ... If the naive way to do it does > not work, can anyone suggest a way to do it ? XML does not support arb

Re: VisualStudio2005 supported in distutils

2006-08-02 Thread Martin v. Löwis
mg schrieb: > Unfortunately, distutils does not support VisualStudio2005. I tried to > modify the file msvccompiler.py without success (this case requires to > support some changes of the Visual Studio 8 register for both Win32 and > Win64). So, I wonder if the integration of VisualStudio2005 in di

Re: VisualStudio2005 supported in distutils

2006-08-07 Thread Martin v. Löwis
mg schrieb: > I know the incompatibility problem to have Python compiled with one > compiler and packages with another one. Nevertheless, in my case, Python > is well compiled with VisualStudio2005 thank to project files provided > by Mr Python himself. So, Python is not yet ready to support comple

Re: VisualStudio2005 supported in distutils

2006-08-07 Thread Martin v. Löwis
Jarek Zgoda schrieb: > Sure, but what if I succesfully compile Python with VS 2005? Hier ist > der Hund begraben, distutils cann't handle this compiler so I'll be > unable to compile any extension for my home-baken Python. It sure can. Just open a "Visual Studio Command Prompt" (or whatever its na

Re: install python on cdrom

2006-08-07 Thread Martin v. Löwis
Fabian Braennstroem schrieb: > Thanks, but unfortunately the administrative policy does not > allow such installation, but could it work, when I do such a > installation in my home directory, copy everything to a > cdrom/dvd and mount it in proper place? Yes, that should work as well. Python won't

Re: Subtyping a non-builtin type in C/C++

2006-08-07 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > I am trying to create a subclass of a python class, defined in python, > in C++, but I am having some problems. Is the base class a classic class or a new-style class? Depending on the answer, the code you should write varies significantly. To create a new type, it mi

Re: Nice unicode -> ascii translation?

2006-08-07 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > The trick is finding the right . Has someone attempted this > before, or am I stuck writing my own solution? In this specific example, there is a different approach, using the Unicode character database: def strip_combining(s): import unicodedata # Expand

Re: Import module with non-standard file name

2006-08-08 Thread Martin v. Löwis
Ben Finney schrieb: > Question: I have Python modules named without '.py' as the extension, > and I'd like to be able to import them. How can I do that? I recommend to use imp.load_module. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: #!/usr/bin/python or #!/usr/bin/env python?

2006-08-08 Thread Martin v. Löwis
John Salerno schrieb: > I understand the difference, but I'm just curious if anyone has any > strong feelings toward using one over the other? I use /usr/bin/env if I don't know what the operating system is; some systems don't have Python in /usr/bin. I use /usr/bin/pythonX.Y if I want a specific

Re: #!/usr/bin/python or #!/usr/bin/env python?

2006-08-08 Thread Martin v. Löwis
Erik Max Francis schrieb: >> I use /usr/bin/env if I don't know what the operating system is; >> some systems don't have Python in /usr/bin. I use /usr/bin/pythonX.Y >> if I want a specific version on a specific operating system (typically >> Linux). > > Even there, /usr/bin/env pythonX.Y would be

Re: sys.platform documentation?

2006-08-12 Thread Martin v. Löwis
Michiel Sikma schrieb: > However, in order to populate the list of platforms, I need to know > which strings sys.platform can return. I haven't found any documentation > on this, but I guess that I'm not looking in the right places! Do any of > you know where I can find a list of possible return va

Re: Memory problem

2006-08-14 Thread Martin v. Löwis
John Machin wrote: > Incredible. That's only 34 MB. What is the size of your paging file? > What memory guzzlers were you running at the same time? What was the > Task Manager "Performance" pane showing while your test was running? > What version of Python? He didn't say Windows (so far). AFAICT,

Re: Memory problem

2006-08-14 Thread Martin v. Löwis
Yi Xing wrote: > Thanks! I just found that that I have no problem with > x=[[10.0]*2560*2560]*500, but x=range(1*2560*2560*30) doesn't work. That's no surprise. In the first case, try x[0][0] = 20.0 print x[1][0] You have the very same (identical) list of 2560*2560 values in x 500 times. To cre

Re: what is the keyword "is" for?

2006-08-15 Thread Martin v. Löwis
daniel wrote: > when I tried to check the stuff out, found sth interesting that if you > define variables in a style like this: > a = b = ['a', 'b'] > changing one list affects the other, and they still refer to same > object. in fact, seems all compound types (dictionary for instance) > behave in

Re: Problem installing Python 2.4.3 on FreeBSD 5.3-RELEASE-p31

2006-08-20 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > I assume this is related to the configure warning... ? Same error with > just a standard "./configure" and "make". > > Any help would be great :) If you don't need the curses module, go on with the installation. It's a known bug in FreeBSD's curses header file. Rega

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Martin v. Löwis
Giovanni Bajo schrieb: >>> I hope this >>> recommendation from the "PSF infrastructure committee" is rejected. >> That is very very unlikely. Who would reject it, and why? > > The community, and I am impressed you do not want to understand the "why". How would "the community" actually reject it?

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Martin v. Löwis
Giovanni Bajo schrieb: > In fact, are you absolutely positive that you need so much effort to > maintain an existing bugtracker installation? I know for sure that GCC's > Bugzilla installation is pretty much on its own; Daniel Berlin does some > maintainance every once in a while (upgrading when ne

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Martin v. Löwis
Giovanni Bajo schrieb: > Frankly, I don't give a damn about the language the application is coded in That's probably one of the reasons why you aren't a member of the Python Software Foundation. Its mission includes to publicize, promote the adoption of, and facilitate the ongoing development of P

Re: Python to use a non open source bug tracker? - Trac?

2006-10-04 Thread Martin v. Löwis
Harry George schrieb: > I'm not on the infrastructure list either. But I wonder why it is > "Roundup or else non-python COTS"? I gave up on Roundup a while ago > due to too many crashes. I'm now using Trac: > > a) Open Source > b) Python > c) Adequate functionality (for me at least) > > http:/

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > No, actually switching trackers can be one big pain in the ass. You > probably aren't aware of how hard it's been for the Python development team > (I think Martin v. Loewis, mostly) to get tracker data out of SF. An > explicit requirement was t

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Martin v. Löwis
Paul Boddie schrieb: > Out of interest, here are some figures: > > KDE: 12983 bugs and 11656 wishes > GNOME: 23624 reports > Python: 7159 bugs, 3843 patches, 477 feature requests > > The Python figures are totals, whereas I can't be sure whether the KDE > and GNOME figures merely refer to t

Re: sax barfs on unicode filenames

2006-10-04 Thread Martin v. Löwis
Fredrik Lundh schrieb: > Diez B. Roggisch wrote: > >> Filenames are expected to be bytestrings. So what happens is that the >> unicode string you pass as filename gets implicitly converted using the >> default encoding. > > it is ? Yes. While you can pass Unicode strings as file names to many Py

Re: sax barfs on unicode filenames: workaround

2006-10-04 Thread Martin v. Löwis
Edward K. Ream schrieb: > Happily, the workaround is easy. Replace theFile with: > > # Use cStringIo to avoid a crash in sax when inputFileName has unicode > characters. > s = theFile.read() > theFile = cStringIO.StringIO(s) > > My first attempt at a workaround was to use: > > s = theFile.read

Re: How to ask sax for the file encoding

2006-10-04 Thread Martin v. Löwis
Edward K. Ream schrieb: > Can anyone tell me how the content handler can determine the encoding of the > file? Can sax provide this info? That's not supported in SAX. If you use Expat directly (module pyexpat), you can set the XmlDeclHandler, which is called when the XML declaration is received

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Martin v. Löwis
Paul Rubin schrieb: > "Martin v. Löwis" <[EMAIL PROTECTED]> writes: >> You fail to recognize that Python is *already* using a non-free software >> for bug tracking, as do thousands of other projects. > > I don't think that reflects an explicit decision.

Re: sax barfs on unicode filenames

2006-10-04 Thread Martin v. Löwis
Fredrik Lundh schrieb: > Martin v. Löwis wrote: > >> Yes. While you can pass Unicode strings as file names to many Python >> functions, you can't pass them to Expat, as Expat requires the file name >> as a byte string. Hence the error. > > sounds like a bug in

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Martin v. Löwis
Paul Rubin schrieb: > True, though GPL 3 tries to address that. Most important is to figure > out the underlying attitude of the host. I realize it's the same > crufty software (or worse) as SF and therefore maybe not so attractive > on those grounds already, but did you think about migrating to

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Martin v. Löwis
Giovanni Bajo schrieb: >> * A data export is available if we decide to switch. [...] > > Out of curiosity, how is this obtained? Is this any plan to take a daily > export > or so? Exactly so. Atlassian would generate a daily dump, and we would copy it to a machine on python.org with a cron job.

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Martin v. Löwis
Fredrik Lundh schrieb: > what I was trying to say (between the lines) was that not only have > the people on that list worked hard to do the evaluation (not to mention > all the developers around the world that has worked even harder to set > up test trackers) That cannot be praised enough. Specia

Re: How to ask sax for the file encoding

2006-10-04 Thread Martin v. Löwis
Irmen de Jong schrieb: > As others have tried to explain, the encoding in the xml header is > not part of the document data itself, it says something about the data. > It would be a bad design decision imo to rely on this meta information > if you really meant that information to be part of the dat

Re: Python to use a non open source bug tracker?

2006-10-04 Thread Martin v. Löwis
Ben Finney schrieb: >> Giovanni Bajo schrieb: >>> It is an extremely bad picture for an open source flag like Python >>> to go to a vendor for such an easy requirement as a bug database. >> You fail to recognize that Python is *already* using a non-free software >> for bug tracking, as do thousands

Re: Python to use a non open source bug tracker?

2006-10-05 Thread Martin v. Löwis
Michael Ströder schrieb: >> Martin, I am by no means understimating Daniel's work. I am just noting that >> the spare-time work he did is, by definition, much much lower than the "6-10 >> people" that the PSF infrastructure committee is calling for. I would like >> this >> statement to be official

Re: MySQLdb for Python 2.5

2006-10-05 Thread Martin v. Löwis
FatherAntox schrieb: >> AFAICT, MySQLdb 1.2.1 builds and works just fine. >> > > What is your setup as I am receiving a number of "Cannot open ..." > errors related to various msysql libraries and includes? I am running > in a Windows XP environment with MySQL 5.1. Thanks in advance. I have bee

Re: Python to use a non open source bug tracker?

2006-10-06 Thread Martin v. Löwis
Paul Rubin schrieb: > How often should a tracker freeze anyway? People with no technical > knowledge at all run BBS systems that almost never freeze. Is a > tracker somehow more failure-prone? It's just a special purpose BBS, > I'd have thought. For whatever reason, the SF bug tracker is often

Re: Python to use a non open source bug tracker?

2006-10-06 Thread Martin v. Löwis
Paul Boddie schrieb: > As I asked before, did anyone look into asking large-scale users of the > various considered products about their experiences with regard to > reliability, scalability, and so on? I didn't ask anyone, primarily because of lack of time. Regards, Martin -- http://mail.pytho

Re: Python to use a non open source bug tracker?

2006-10-08 Thread Martin v. Löwis
Giovanni Bajo schrieb: >>> So, you might prefer 6-10 people to activate a new tracker account >>> faster than light. I'd rather have 3-days delay in administrative >>> issues because our single administrator is sleeping or whatever, and >>> then have 2-3 people doing regular bug processing. > > Ar

Re: Python to use a non open source bug tracker?

2006-10-08 Thread Martin v. Löwis
Paul Boddie schrieb: >> When SF is down, people sometimes send tracker items to >> the pydev list instead, when means someone else (who?) has to put in the >> tracker or it gets lost. > > According to Harald Armin Massa's PostgreSQL talk at EuroPython, the > PostgreSQL people manage all their bugs

Re: distutils: optionally build C bindings to an external library

2006-10-09 Thread Martin v. Löwis
Kirill Simonov schrieb: > I've written a pure Python module, which could optionally use an > external C library. The external library is not required to be on the > user computer however, so I'd like not to build the bindings by default, > but allow a user to turn the build on by specifying some pa

Re: pythonw documentation?

2006-10-09 Thread Martin v. Löwis
Roger Miller schrieb: > However on a more general note, the only references to pythonw that I > could find in the Python 2.5 documentation are in the Macintosh > section. Have I overlooked something, or is this a deficiency that > should be addressed? You are right that it currently isn't document

Re: distutils:permissions problems

2006-10-09 Thread Martin v. Löwis
Eric S. Johansson schrieb: > The problem is that, because of a quirk (or misfeature) of VM Ware > shared filesystem, all of the directories and files are owned by root > with a 700 permissions. When I run setup.py install, they are installed > as root with 700 permissions. How can I alter the beh

Re: does raw_input() return unicode?

2006-10-10 Thread Martin v. Löwis
Stuart McGraw schrieb: > So, does raw_input() ever return unicode objects and if > so, under what conditions? At the moment, it only returns unicode objects when invoked in the IDLE shell, and only if the character entered cannot be represented in the locale's charset. Regards, Martin -- http://

Re: does raw_input() return unicode?

2006-10-10 Thread Martin v. Löwis
Theerasak Photha schrieb: >> At the moment, it only returns unicode objects when invoked >> in the IDLE shell, and only if the character entered cannot >> be represented in the locale's charset. > > Why only IDLE? Does urwid or another console UI toolkit avoid this somehow? I admit I don't know w

Re: does raw_input() return unicode?

2006-10-10 Thread Martin v. Löwis
Theerasak Photha schrieb: > The other way around: would urwid use raw_input() or other Python > input functions anywhere? Since I still don't know what urwid is, I can't answer the question. It should be easy enough to grep its source code to find out whether it ever uses raw_input. > And what ca

Re: Funky file contents when os.rename or os.remove are interrupted

2006-10-10 Thread Martin v. Löwis
Russell Warren schrieb: > Any insight from someone with knowledge of the internal operations of > os.remove and/or os.rename would be greatly appreciated, although I > expect the crux may be at the os level and not in python. Just to confirm what others have said: Python has nothing to do with tha

Re: Problem compiling C++ code with python embedded

2006-10-10 Thread Martin v. Löwis
vduber6er schrieb: > g++ -Wall ibdws.cpp ../cgic205/cgic.c -oibdws.cgi -Lcgraph > -lcgraph -Icgraph/Cgraph/source -I../cgic205 -L../cgic205 > -I/usr/include/python2.2 -L/usr/lib > /python2.2/site-packages -lpython2.2 > > but i get the following error when i build now: > > /usr/bin/ld: can

Re: does raw_input() return unicode?

2006-10-11 Thread Martin v. Löwis
Neil Cerutti schrieb: > I'm all mindboggley. Just when I thought I was starting to > understand how this character encoding stuff works. Are > PythonWin's stdout and stdin implementations is incomplete? Simple and easy: yes, they are. Regards, Martin -- http://mail.python.org/mailman/listinfo/py

Re: Compile python on Solaris 64bit

2006-10-12 Thread Martin v. Löwis
Martijn de Munnik schrieb: > anybody succesfully compiled python on solaris? If that's really all you want to know: yes, I did. It works for me on 32-bit SPARC, and 64-bit SPARC. If you want to know more, you have to be *a lot* more precise as to what precisely you are trying to achieve, and how

Re: Cannot force configure/setup.py to pick up location of readline (SFWrline) on Solaris 10

2006-10-13 Thread Martin v. Löwis
Chris Miles schrieb: > How do I force the build to use the custom paths? Not through setup.py. Instead, you edit Modules/Setup to provide per-module compile and link flags. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Big speed boost in os.walk in Python 2.5

2006-10-13 Thread Martin v. Löwis
looping schrieb: > Maybe this improvement could be backported in Python 2.4 branch for the > next release ? As Fredrik explains, this is probably the side-effect of a from-scratch rewrite of the relevant functions. Another (undesirable) side-effect is that the resulting binary won't work on Window

Re: Cannot force configure/setup.py to pick up location of readline (SFWrline) on Solaris 10

2006-10-15 Thread Martin v. Löwis
Chris Miles schrieb: > I hope this process can be improved, and if I have time I'll look at why > make fails half way but works fine when kicked off a second time. You need to use GNU make for that to work. The build regenerates the makefile, but Sun make doesn't recognize the change. There was a

Re: Where I can find

2006-10-15 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > Where I can find this files(modules): > > fcntl,FCNTL,tty,termios, TERMIOS They are included in the standard installation of Python. Notice that some of them work only on Unix. Also notice that FCNTL no longer exist; I'm not sure whether TERMIOS ever existed. Regards

Re: Faulty encoding settings

2006-10-17 Thread Martin v. Löwis
Neil Cerutti schrieb: > The Cygwin binary I have (2.4.3) reports sys.stdin.encoding as > 'US-ASCII', which is quite wrong. A Cygwin terminal uses, as far > as I can tell, iso-8859-1. This renders the above construction > useless if the user enters any character codes above 128. > Using raw_input in

Re: Help: Python2.3 & Python2.4 on RHEL4 x86_64

2006-10-19 Thread Martin v. Löwis
Christopher Taylor schrieb: > This basically means to me that Python2.4 is loading gloab.py from > /usr/lib64/Python2.3 insead of /usr/lib/Python2.4 (even thought I > wanted to install the related files in /usr/lib64/Python2.4) > > Can someome please help! Can you please report what sys.path is?

Re: How to upgrade python from 2.4.3 to 2.4.4 ?

2006-10-19 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > I just want to upgrade my python version from 2.4.3 to 2.4.4,do I need > to uninstall python 2.4.3 first ? > > I'd rather not to do so, because I have installed some other python > packages for python2.4.3. You don't have to uninstall. Installing "on top" will work ju

Re: ZODB and Python 2.5

2006-10-21 Thread Martin v. Löwis
Jean-Paul Calderone schrieb: > Python 2.5 made quite a changes which were not backwards compatible, > though. I think for the case of Python 2.4 -> Python 2.5 transition, > quite a few apps will be broken, many of them in relatively subtle > ways (for example, they may have been handling OSError i

Re: Fwd: Re: How to upgrade python from 2.4.3 to 2.4.4 ?

2006-10-21 Thread Martin v. Löwis
Kenneth Long schrieb: >> Okay if one builds such from sources... but us poor >> Windows flunkies >> without a build environment have to wait for some >> kindly soul to build >> the installer compatible with the new Python >> version. >> > especially since I havent got MS visual studio... > and

Re: PSF Infrastructure has chosen Roundup as the issue tracker for Python development

2006-10-21 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > I wonder if the committee has really decided on a PROBLEM or BUG > tracker, not an "issue" tracker. For some silly reason, "issue" has > become a euphemism for "problem" nowadays. It is worth keeping in mind > the difference. Questions about the future direction of Pyth

Re: Py 2.5: Bug in sgmllib

2006-10-22 Thread Martin v. Löwis
Michael Butscher schrieb: > Is this a bug or is SGMLParser not meant to be used for unicode strings > (it should be documented then)? In a sense, SGML itself is not meant to be used for Unicode. In SGML, the document character set is subject to the SGML application. So what specific character a c

Re: Socket module bug on OpenVMS

2006-10-23 Thread Martin v. Löwis
Irmen de Jong schrieb: > In my opinion Python's socket module itself could implement these > workarounds. That would make user code a lot cleaner and less > error prone, and more portable. What do other people think? It depends: when VMS defines MSG_WAITALL, but doesn't implement it correctly, the

Re: Help: Python2.3 & Python2.4 on RHEL4 x86_64

2006-10-23 Thread Martin v. Löwis
Christopher Taylor schrieb: > I had /usr/lib64/python2.3 included and that's why it was breaking. I > took it out and it works fine now. Unfortunately, it still puts the > lib files in /usr/lib instead of /usr/lib64. I'm assuming all I need > to do is set libdir accordingly and the files will ge

Re: ANN compiler2 : Produce bytecode from Python 2.5 Abstract Syntax Trees

2006-10-23 Thread Martin v. Löwis
Georg Brandl schrieb: > Perhaps you can bring up a discussion on python-dev about your improvements > and how they could be integrated into the standard library... Let me second this. The compiler package is largely unmaintained and was known to be broken (and perhaps still is). A replacement impl

Re: encoding of sys.argv ?

2006-10-23 Thread Martin v. Löwis
]:~/tmp$ echo $LANG de_DE.UTF-8 [EMAIL PROTECTED]:~/tmp$ cat a.py import sys print sys.argv [EMAIL PROTECTED]:~/tmp$ python a.py Martin v. Löwis ['a.py', 'Martin', 'v.', 'L\xc3\xb6wis'] So clearly, my terminal application + shell passes them as UTF-8, as

Re: using mmap on large (> 2 Gig) files

2006-10-23 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > Anyone ever done this? It looks like Python2.4 won't take a length arg >> 2 Gig since its not seen as an int. What architecture are you on? On a 32-bit architecture, it's likely impossible to map in 2GiB, anyway (since it likely won't fit into the available address sp

Re: Socket module bug on OpenVMS

2006-10-23 Thread Martin v. Löwis
Irmen de Jong schrieb: > Although I'm not yet convinced about the all-or-nothing failure > model you were talking about. How can I know if recv() fails > with a MemoryError (or socket error) that it actually didn't > receive anything? Is that even an assumption I can rely on? Yes, you can. It can'

Re: Help: Python2.3 & Python2.4 on RHEL4 x86_64

2006-10-23 Thread Martin v. Löwis
Makefile.pre.in has LIBDIR= $(exec_prefix)/lib so it seems that LIBDIR isn't configurable. > Could not find platform independent libraries > Could not find platform dependent libraries > Consider setting $PYTHONHOME to [:] > 'import site' failed; use -v for tr

Re: Help: Python2.3 & Python2.4 on RHEL4 x86_64

2006-10-24 Thread Martin v. Löwis
Christopher Taylor schrieb: >> Ah, I see. The reason is pretty simple: Makefile.pre.in has >> >> LIBDIR= $(exec_prefix)/lib >> >> so it seems that LIBDIR isn't configurable. > > So you would agree that this is a bug? I personally think this is a bug in AMD64-Linux. Libraries should be s

Re: using mmap on large (> 2 Gig) files

2006-10-24 Thread Martin v. Löwis
sturlamolden schrieb: > Martin v. Löwis wrote: > >> What architecture are you on? On a 32-bit architecture, it's likely >> impossible to map in 2GiB, anyway (since it likely won't fit into >> the available address space). > > Indeed. But why does Python&

Re: using mmap on large (> 2 Gig) files

2006-10-24 Thread Martin v. Löwis
sturlamolden schrieb: > Looking at Python's source (mmapmodule.c), it seems that "mmap.mmap" > always sets the offset argument in Windows MapViewOfFile and UNIX to 0. > This means that it is always mapping from the beginning of the file. > Thus, Python's mmap module is useless for large files. This

Re: Python 2.5 ; Effbot console ; thank ; pb release.

2006-10-24 Thread Martin v. Löwis
Ben Finney schrieb: >> "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: >>> some days, I ask myself why I shouldn't just use GPL for >>> everything I do, and ship it as source code only. >> because then you would deny your work to thousands of ungrateful, >> unmotivated lazy buggers like me... > > Not

Re: ANN compiler2 : Produce bytecode from Python 2.5 Abstract Syntax Trees

2006-10-24 Thread Martin v. Löwis
Paul Boddie schrieb: >> Let me second this. The compiler package is largely unmaintained and >> was known to be broken (and perhaps still is). A replacement >> implementation, especially if it comes with a new maintainer, would >> be welcome. > > I don't agree entirely with the "broken" assessment

Re: Help: Python2.3 & Python2.4 on RHEL4 x86_64

2006-10-24 Thread Martin v. Löwis
Christopher Taylor schrieb: > I disagree. From what I see, the error, as far as python is > considered, is not being able to specify the location where libs are > put, despite the fact that the --LIBDIR= option is listed. It just > happens to manifest itself in AMD64/EM64T Linux, specifically RH

Re: Help: Python2.3 & Python2.4 on RHEL4 x86_64

2006-10-24 Thread Martin v. Löwis
Christopher Taylor schrieb: >> The Linux distributions already provide Python binaries (I believe >> Redhat does, too). You could study what they do to achieve that. > > Yes, this is true ... but they do not package the most up-to-date > version .. which I need. Sure. However, I still think they

Re: The status of Python and SOAP?

2006-10-24 Thread Martin v. Löwis
Thomas W schrieb: > I'm going to give a presentation of python to my co-workers at a very > pro-microsoft workplace. Almost everything we need is currently > supported by the standard distro + the win32all package, but we also > need support for SOAP. I've tried SOAPpy ( didn't get it to compile, >

Re: default python when multiple python installation on the box

2006-10-24 Thread Martin v. Löwis
j_nwb schrieb: >I have multiple python installations. 2.2, 2.3, 2.4. When I install a > new package (pygtk2) , it always install in python 2.3. >I changed the /usr/bin/python to be 2.4 binary. Still the same behavior. >How does rpms, determine which installation to update ? Is there a >

Re: using mmap on large (> 2 Gig) files

2006-10-24 Thread Martin v. Löwis
sturlamolden schrieb: > A patch would involve an new object, say, "mmap.mmap2" that thakes the > additional offeset parameter. I don't want it to break any code > dependent on the existing "mmap.mmap" object. Also, I think mmap.mmap2 > should allow the file object to be None, and in that case retu

Re: using mmap on large (> 2 Gig) files

2006-10-25 Thread Martin v. Löwis
sturlamolden schrieb: > 2. The OS may be stupid. Mapping a large file may be a major slowdown > simply because the memory mapping is implemented suboptimally inside > the OS. For example it may try to load and synchronise huge portions of > the file that you don't need. Can you give an example of

Re: unsigned 32 bit arithmetic type?

2006-10-25 Thread Martin v. Löwis
Robin Becker schrieb: > Hi, just trying to avoid wheel reinvention. I have need of an unsigned > 32 bit arithmetic type to carry out a checksum operation and wondered if > anyone had already defined such a beast. > > Our current code works with 32 bit cpu's, but is failing with 64 bit > comparison

<    3   4   5   6   7   8   9   10   11   12   >