Python 3.2.2rc1

2011-08-14 Thread Martin v. Löwis
nges in 3.2, see http://docs.python.org/3.2/whatsnew/3.2.html To download Python 3.2 visit: http://www.python.org/download/releases/3.2/ Please consider trying Python 3.2 with your code and reporting any bugs you may notice to: http://bugs.python.org/ Enjoy! -- Martin v. Löwis (

[ANN] Python 2.5.6 released

2011-05-27 Thread Martin v. Löwis
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.5.6. There were no changes since the release candidate. This is a source-only release that only includes security fixes. The last full bug-fix release of Python 2.5 was Python 2.5.4. Us

[ANN] Python 2.5.6 Release Candidate 1

2011-04-17 Thread Martin v. Löwis
On behalf of the Python development team and the Python community, I'm happy to announce the release candidate 1 of Python 2.5.6. This is a source-only release that only includes security fixes. The last full bug-fix release of Python 2.5 was Python 2.5.4. Users are encouraged to upgrade to the la

Re: 2to3 and maketrans

2011-03-03 Thread Martin v. Löwis
Am 04.03.2011 03:21, schrieb Dan Stromberg: > > On Thu, Mar 3, 2011 at 3:46 PM, Martin v. Loewis > wrote: > > That depends on how you chose to represent text in 2.7. > The recommended way for that (also with 3.x in mind) > is that you should use Unicode str

Re: Python 3 encoding question: Read a filename from stdin, subsequently open that filename

2010-11-30 Thread Martin v. Löwis
> It'd be great if all programs used the same encoding on a given OS, > but at least on Linux, I believe historically filenames have been > created with different encodings. IOW, if I pick one encoding and go > with it, filenames written in some other encoding are likely to cause > problems. So I

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-07 Thread Martin v. Löwis
> I saw you already mentioned work toward this a few months (years ?) > ago. Is there some kind of roadmap, or could you use some help ? I > would really like to solve this issue as much as we possibly can, Well, Python 3 has already dropped stdio for its own io library, and I do want to get rid o

Re: Upgrade Python 2.6.4 to 2.6.5

2010-05-11 Thread Martin v. Löwis
> If we install over an existing version of Python 2.6.5, will our PTH > files and site-packages be preserved? > > Or do we need to back out our 3rd party packages, install Python 2.6.5 > and then manually restore our 3rd party packages? An upgrade installation will only replace the Python files,

Re: Download Visual Studio Express 2008 now

2010-04-16 Thread Martin v. Löwis
Brian Blais wrote: > On Apr 12, 2010, at 16:36 , Martin v. Loewis wrote: > >> If you are planning to build Python extension modules in the next five >> years, I recommend that you obtain a copy of VS Express > > Am I missing something here? I have heard this before, but I have built > extension

Re: missing dll follow-up

2010-04-14 Thread Martin v. Löwis
>> Try the VS 2008 SP1 redistributables, from >> http://www.microsoft.com/downloads/details.aspx?displaylang=de&FamilyID=a5c84275-3b97-4ab7-a40d-3802b2af5fc2 > > That looks like Microsoft's German site. I wonder if their VS 2008 > runtimes are localized for specific languages? Apparently so; just

Re: using Python distutils bdist_msi to create installer for large complicated package

2010-03-21 Thread Martin v. Löwis
> I've been re-thinking the UpLib Windows installer technology, and it > occurred to me to wonder why I can't just use the nice bdist_msi module > in Python to build my packages. I took a look, and it seems almost > doable. Presumably you wrote it? Correct. > UpLib is a big package, with lots o

Re: Python, Reportlabs, Pil and Windows 7 (64bit)

2010-03-12 Thread Martin v. Löwis
> Not sure if this is a bug I think it is. It seems that the cross-build support in msvc9compiler has been tested only in a build tree of Python (where there is no Libs directory). For released copies of Python, I could change that to distribute the AMD64 pythonXY.lib in libs/amd64. [FWIW, I'm st

[ANN] Python 2.5.5 Release Candidate 2.

2010-01-24 Thread Martin v. Löwis
On behalf of the Python development team and the Python community, I'm happy to announce the release candidate 2 of Python 2.5.5. This is a source-only release that only includes security fixes. The last full bug-fix release of Python 2.5 was Python 2.5.4. Users are encouraged to upgrade to the la

[ANN] Python 2.5.5 Release Candidate 1.

2010-01-14 Thread Martin v. Löwis
On behalf of the Python development team and the Python community, I'm happy to announce the release candidate 1 of Python 2.5.5. This is a source-only release that only includes security fixes. The last full bug-fix release of Python 2.5 was Python 2.5.4. Users are encouraged to upgrade to the la

Re: Can't print Chinese to HTTP

2009-11-30 Thread Martin v. Löwis
Gnarlodious wrote: > Hello. The "upgrade to Python 3.1 has been disaster so far. I can't > figure out how to print Chinese to a browser. If my script is: > > #!/usr/bin/python > print("Content-type:text/html\n\n") > print('晉') > > the Chinese string simply does not print. It works in interactive

Re: Creating a datetime object from a C Extention

2009-11-30 Thread Martin v. Löwis
> I'm writing a python C Extension and need to create datetime objects but > when I call > value = PyDateTime_FromDateAndTime(ti->tm_year+1900, ti->tm_mon, > ti->tm_mday, ti->tm_hour, ti->tm_min, ti->tm_sec, u); > I get an SegFault. > > ti = {tm_sec = 25, tm_min = 37, tm_hour = 8, tm_mday = 30, tm

Re: semantics of ** (unexpected/inconsistent?)

2009-11-29 Thread Martin v. Löwis
>> I think you answered your own question. 3**2 comes first in the order >> of operations, followed by the negation. > > No, that's not the problem, I'm ok with the operator precedence of - vs ** > > My problem is why I don't get the same result if I use the literal -3 or > a variable that contai

Re: xmlrpc idea for getting around the GIL

2009-11-23 Thread Martin v. Löwis
> What I meant was that I am *not allowed* to make calls to the CPython > API from the threads I currently have because these threads are high > priority and are never allowed to make blocking calls. Fortunately, > each of these threads can have a completely separate interpreter, so > my idea was t

Re: Does Python 3.x support Unicode-named attributes?

2009-11-20 Thread Martin v. Löwis
> Does Python 3.x support Unicode-named attributes? Most certainly, yes. All identifiers (and thus all attribute names) are Unicode strings in Python 3.x. > There are several modules which operate on HTML and try to > hammer HTML/XML into Python object attributes. I've had > BeautifulSou

Re: Documentation bugs in 3.1 - C-API - TypeObjects

2009-11-15 Thread Martin v. Löwis
DreiJane wrote: > Thanks a second time - the picture has > gotten clearer indeed. But for third-party > readers the complexities of this matter > require the correction, that > > "Py_Type(&Foo_Type) = &PyType_Type" > > must be: > "Py_TYPE(&Foo_Type) = &PyType_Type " > > - or am i completely wron

Re: Documentation bugs in 3.1 - C-API - TypeObjects

2009-11-15 Thread Martin v. Löwis
> Still there remains the difference to what is told with the > Noddy_Type in the tutorial. Please report that to bugs.python.org. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Documentation bugs in 3.1 - C-API - TypeObjects

2009-11-14 Thread Martin v. Löwis
> This cannot work, because Foo_Type is no PyObject but a PyVarObject > (independent > of the use of PyVarObject_HEAD_INIT or PyObject_HEAD_INIT). The code > line would > work so: > > ((PyObject *)&Foo_Type)->ob_type = &PyType_Type However, this is not what you should use. Instead, use Py_Type(&

Re: the unicode saga continues...

2009-11-14 Thread Martin v. Löwis
> Can anybody clue me in to what's going on here? It's as Mark says: the console encoding is cp437 on your system, cp1252. Windows has *two* default code pages at any point in time: the OEM code page, and the ANSI code page. Either one depends on the Windows release (Western, Japanese, etc.), and

Re: DHT for Python 3.x?

2009-11-10 Thread Martin v. Löwis
Terry Reedy wrote: > Salim Fadhley wrote: >> There are plenty of good DHT > distributed hash table? I think it's that one. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python C api: create a new object class

2009-11-10 Thread Martin v. Löwis
> How can I create an instance class in Python, currently I do: > > class empty: > pass > > Then anytime I want that class (which I treat like a dictionary): > > o = empty() > o.myattr = 1 > etc > > Is there is a one line syntax to instantiate an instance? > > Any other ways than this: >

Re: DHT for Python 3.x?

2009-11-10 Thread Martin v. Löwis
Salim Fadhley wrote: > There are plenty of good DHT projects for Python 2.x, however from > what I can tell none of them have made the jump to 3.x yet. > > I'm really keen to support Python 3.x for a project I'm working on. I > know that many developers (correctly) consider switching to Python 3 >

Re: restricted mode???

2009-11-04 Thread Martin v. Löwis
> I thought that restricted mode died ages ago. > > Any ideas what could be causing this? Restricted mode is still available, and activated whenever a frame's builtins directory is different from the interpreter's; see PyFrame_IsRestricted. Regards, Martin -- http://mail.python.org/mailman/list

Re: Publishing new release on PyPI: How?

2009-10-30 Thread Martin v. Löwis
> Well, maybe I'm completely blind but I can't find a way to add a new release > to PyPI index for python-ldap, not just a new file to an existing release > version. I recommend to run "python setup.py register", rather than using the HTML UI. > I'm the project owner and I did it several times in

Re: Web development with Python 3.1

2009-10-27 Thread Martin v. Löwis
> I am very much new to Python, and one of my first projects is a simple > data-based website. I am starting with Python 3.1 (I can hear many of > you shouting "don't - start with 2.6"), but as far as I can see, none of > the popular python-to-web frameworks (Django, CherryPy, web.py, etc.) > are P

Re: repr(complex) in Py3.1

2009-10-24 Thread Martin v. Löwis
> I know at least that the float repr() was modified in Py3.1, but is the > above behaviour intentional? It certainly breaks doctests, and I don't see > a good reason for that. I don't know whether it was intentional, but it looks right to me. 2j is the complex number +0.0+2.0j (right?). Then, -(2

Re: a simple unicode question

2009-10-20 Thread Martin v. Löwis
> Where are the literals (i.e. u'\N{DEGREE SIGN}') defined? I found > http://www.unicode.org/Public/5.1.0/ucd/UnicodeData.txt > Is that the place to look? Correct - you are supposed to fill in a Unicode character name into the \N escape. The specific list of names depends on the version of the UCD

Re: Windows GCC Support (Mingw & Mingw-w64)

2009-10-04 Thread Martin v. Löwis
> Is there any chance of getting some of the devs or anyone familiar > enough with the source code to make this possibility become reality? Please take a look at http://bugs.python.org/issue4709 Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: When is divmod(a,b)[0] == floor(a/b)-1 ?

2009-09-26 Thread Martin v. Löwis
>> In [21]: a = 10.0 > >> In [22]: b = 10.0 / 3.0 > >> In [24]: divmod(a, b)[0] >> Out[24]: 2.0 > >> In [25]: math.floor(a / b) - 1.0 >> Out[25]: 2.0 > > Wow. To me this stuff is just black magic, with a bit of voodoo > added for good measure... Maybe some day I'll understand it. I think thi

Re: Support for Windows 7 ?

2009-09-04 Thread Martin v. Löwis
> Given that the problem is with reading the file system, it is likely to > be w/ sth else > > than Windows 7, maybe some weird HD partition combination? Without having seen any details, I refuse to guess. Most likely, it is a user mistake. Regards, Martin -- http://mail.python.org/mailman/lis

Re: Support for Windows 7 ?

2009-09-04 Thread Martin v. Löwis
> On of my students has installed Windows 7 RTM on his cherished computer, > and claims that Python 2.6.2 doesn't support it. > The sample program had a problem with the library function > os.listdir(dirarg) always returning the same result for different values > of dirarg. > > DO YOU KNOW HOW FAR

Re: Python community buildbot page still 503

2009-09-01 Thread Martin v. Löwis
> On reading your previous email, I assumed that someone (you, perhaps) > had tried to contact Grig Gheorghiu (he was in charge of it last I > heard) to let him know that some maintenance was required and that > someone (you, perhaps) only made the decision to remove the community > buildbots after

Re: Python community buildbot page still 503

2009-09-01 Thread Martin v. Löwis
> If I am not mistaken http://python.org/dev/buildbot/community/all/ has > been down since python.org had its harddrive issues. > > Anyone know a time line on getting it back up and running. This service is, unfortunately, unmaintained. It broke when I upgraded the buildbot master to a new code b

Re: break unichr instead of fix ord?

2009-08-29 Thread Martin v. Löwis
> To reiterate, I am not advocating for any change. I > simply want to understand if there is a good reason > for limiting the use of unchr/ord on narrow builds to > a subset of the unicode characters that Python otherwise > supports. So far, it seems not and that unichr/ord > is a poster child f

Re: break unichr instead of fix ord?

2009-08-28 Thread Martin v. Löwis
> The PEP says: > * unichr(i) for 0 <= i < 2**16 (0x1) always returns a >length-one string. > > * unichr(i) for 2**16 <= i <= TOPCHAR will return a >length-one string on wide Python builds. On narrow >builds it will raise ValueError. > and > * ord() is al

Re: break unichr instead of fix ord?

2009-08-26 Thread Martin v. Löwis
> My apologies for the red herring. I was working from > a comment in my replacement ord() function. I dug up > an old copy of Python 2.4.3 and could not reproduce it > there either so I have no explanation for the comment > (which I wrote). Python 2.3 maybe? No. The behavior you observed would

Re: break unichr instead of fix ord?

2009-08-26 Thread Martin v. Löwis
> In Python 2.5 on Windows I could do [*1]: > > >>> a = unichr (65600) > >>> a[0],a[1] > (u'\ud800', u'\udc40') I can't reproduce that. My copy of Python on Windows gives Traceback (most recent call last): File "", line 1, in unichr(65600) ValueError: unichr() arg not in range(0x100

Re: print() and unicode strings (python 3.1)

2009-08-24 Thread Martin v. Löwis
> I can't figure out a way to programatically set the encoding for > sys.stdout. So where does that leave me? You should be setting the terminal encoding administratively, not programmatically. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: print() and unicode strings (python 3.1)

2009-08-24 Thread Martin v. Löwis
> I don't understand why I'm getting an encode error in python 3.1. The default encoding is not relevant here at all. Look at sys.stdout.encoding. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: 2.6 windows install

2009-08-21 Thread Martin v. Löwis
> The default windows install puts Python26.dll in \windows\system32. I > haven't tried this, but you could probably fix your install by moving > Python26.dll into the Python26 directory. Only the admin installation should do that (for all users). The "just for me" installation won't. Regards, Ma

Re: 2.6 windows install

2009-08-21 Thread Martin v. Löwis
> Did you install Python to the network device from your XP box? That > would explain why you can run it: the required registry settings & > environment variables are added by the installer, none of which is > occurring on any computer other than the one from which you installed. In principle, Pyt

Re: pypi category

2009-08-21 Thread Martin v. Löwis
> Would someone be able to inform me how a category can be added to the > pypy list of categories? > I'd like to add a CAD & Geometry category. > ( I develop PythonOCC, wrappers for the OpenCASCADE CAD kernel, which > is why ) Make a specific proposal to catalog-...@lists.python.org, along with a

Mercurial migration: help needed

2009-08-18 Thread Martin v. Löwis
This is a repost from two weeks ago. It didn't get much feedback last time. I still keep trying, reposting to python-list also this time. In this thread, I'd like to collect things that ought to be done but where Dirkjan has indicated that he would prefer if somebody else did it. Item 1 -- Th

Re: Python 2.6 still not giving memory back to the OS...

2009-08-16 Thread Martin v. Löwis
> As far as releasing memory back to the OS is concerned, I have dim > memories of *x systems where free() would return space to the OS if > the block was "large" and it was next to the "break" point ... this > effect could be what you are seeing. Today, there are two cases when malloc returns mem

Re: coding for multiple versions of python

2009-08-14 Thread Martin v. Löwis
> He's assuming: >1) an OS that supports symlinks >2) two versions of Python on same system >3) one set of pure-python sources that want to stay in synch for both > versions. Actually, the OP said he has HP(-UX, I assume), and Linux, so it would be two versions of Python on different

Re: coding for multiple versions of python

2009-08-14 Thread Martin v. Löwis
>> Specifically, put the source code into /net/source/python/foo/*.py. >> Then, on each system, put symlinks to all .py files into >> lib/site-packages/foo. Then Python will place the .pyc files next >> to the symlinks, not next to the actual .py files. > > Why would he need two sets of .py files?

Re: coding for multiple versions of python

2009-08-13 Thread Martin v. Löwis
> I'm guessing I need to configure cvs to copy files to both locations > whenever I commit. Does that sound right? Is there a better way I'm not > thinking of? If the set of files doesn't change too often, you can use symlinks. That's how Debian currently installs Python packages for multiple ve

Re: .h files?

2009-08-08 Thread Martin v. Löwis
> Question. Seems that with python distributions you have the option to > include either "external facing, public" *.h files, and make them > available, or include the whole kit and kaboodle [all *.h files]. What python distributions are you referring to? The ones I know don't make this distincti

Re: www.python.org website is down?

2009-08-08 Thread Martin v. Löwis
> This is probably a stupid question, but Is there going to be any data > loss if it turns out that the disk has died completely? I assume there > are backups of the repo that are geographically distributed. Yes, we have backups, and are restoring them at the moment. However, we still haven't give

Re: Character encoding & the copyright symbol

2009-08-06 Thread Martin v. Löwis
> As a side note, you should probably use something other than "file" for > the parameter name in GetFileContentsAsString() since file() is a Python > function. Python 3.1.1a0 (py3k:74094, Jul 19 2009, 13:39:42) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more inform

Re: How to comment on a Python PEP?

2009-08-06 Thread Martin v. Löwis
> Is there a mechanism for submitting comments on a Python PEP? You post to python-dev or comp.lang.python, and you CC the author. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: String to valid Python identifier

2009-08-06 Thread Martin v. Löwis
> Is there any easy function in the stdlib to convert any random string in > a valid Python identifier .. possibly by replacing non-valid characters > with _ ? I think this is fairly underspecified as a problem statement. A solution that would meet your specification would be def mkident(s):

Re: No PyPI search for 3.x compatible packages

2009-07-30 Thread Martin v. Löwis
Neil Hodgson wrote: >There appears to be no way to search PyPI for packages that are > compatible with Python 3.x. There are classifiers for 'Programming > Language' including 'Programming Language :: Python :: 3' but that seems > to be for implementation language since there are so many packag

Re: 64-bit issues with dictionaries in Python 2.6

2009-07-29 Thread Martin v. Löwis
> Are there any known issues with dictionaries in Python 2.6 (not 2.6.2) > when running on a 64-bit platform? No, none. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: C-API, tp_dictoffset vs tp_members

2009-07-26 Thread Martin v. Löwis
> I have a predefined set of members, some of which are optional. Having optional fields is also a good reason. >>> What is the use of T_OBJECT_EX vs T_OBJECT in PyMemberDef then? >> Right - this works for optional objects. However, it can't possibly >> work for any of the other fields. >

Re: C-API, tp_dictoffset vs tp_members

2009-07-26 Thread Martin v. Löwis
>>> I have a predefined set of members, some of which are optional. >> Having optional fields is also a good reason. > > What is the use of T_OBJECT_EX vs T_OBJECT in PyMemberDef then? Right - this works for optional objects. However, it can't possibly work for any of the other fields. > I woul

Re: C-API, tp_dictoffset vs tp_members

2009-07-26 Thread Martin v. Löwis
> When would I use PyObject_SetAttrString/tp_dictoffset instead of tp_members? When I have a variable list of attributes, and cannot statically know what those attributes might be. > I have a predefined set of members, some of which are optional. Having optional fields is also a good reason. >

Re: uniicode and executing a process with subprocess.call, or os.system

2009-07-25 Thread Martin v. Löwis
> I am very confused about unicode. Can someone point me in the right > direction? Try Python 3.1. This should accept Unicode strings directly for sp.call, so you wouldn't need to encode first. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: installing 2.6 on vista64

2009-07-24 Thread Martin v. Löwis
> I just downloaded and attempted to install python 2.6.2. The > installer proceeds to do its work then dies, leaving an entry in the > eventlog: > > Windows Installer installed the product. Product Name: Python 2.6.2. > Product Version: 2.6.2150. Product Language: 1033. Installation > success or

Re: Compilation problem with Python < 2.6 and db >= 4.7

2009-07-20 Thread Martin v. Löwis
> Is there a way to make the bsddb module compile against db>=4.7 for python < > 2.6 > (2.4.6, 2.5.4)? I don't think so, no. > I didn't find something on it. If you don't want to use pybsddb either, for fear of incompatible API, your only choice is to port _bsddb.c to the newer db versions. BSD

Re: Managing non-ascii filenames in python

2009-07-19 Thread Martin v. Löwis
> I thought the correct way to do this in python would be to scan the > dir > files=os.listdir(os.path.dirname( os.path.realpath( __file__ ) )) > > then print the filenames > for filename in files: > print filename > > but as expected teh filename is not correct - so correct it using the > file

Re: 2.4 VS 3.1 for simple print

2009-07-10 Thread Martin v. Löwis
> Why does > print "GarbageCollector: collected %d objects." % (gc.collect()) > > work in 2.4 but not in 3.1? Because print is a function in 3.1, so you have to follow it with a parenthesis. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Code that ought to run fast, but can't due to Python limitations.

2009-07-05 Thread Martin v. Löwis
> This is a good test for Python implementation bottlenecks. Run > that tokenizer on HTML, and see where the time goes. I looked at it with cProfile, and the top function that comes up for a larger document (52k) is ...validator.HTMLConformanceChecker.__iter__. This method dispatches various val

Re: urllib with x509 certs

2009-07-04 Thread Martin v. Löwis
> Thanks for the reply. I want my key to be as secure as possible. So I > will remove pass phrase if only there is no other possibility to go > through authentication. And you put the passphrase into the source code instead? How does it make that more secure? Regards, Martin -- http://mail.pytho

Re: urllib with x509 certs

2009-07-04 Thread Martin v. Löwis
> This works Ok! But every time I am asked to enter PEM pass phrase, > which I specified during dividing my .p12 file. > So my question... What should I do to make my code fetch any url > automatically (without asking me every time to enter pass phrase)? > As I understand there is impossible to spe

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Martin v. Löwis
>> On behalf of the Python development team, I'm thrilled to announce the >> first production release of Python 3.1. > > Why is everyone always thrilled to announce things? I cannot talk about everyone, but in the specific case, I suppose Benjamin was thrilled because it was his first release of

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Martin v. Löwis
> 2. How do you do this for non-invertible encodings (e.g. ISO-2022)? ISO-2022 cannot be used as a system encoding. Please do read the responses I write, and please do identify yourself. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: encoding problem

2009-06-28 Thread Martin v. Löwis
> That is the reason why we have to explicitly declare a encoding as > long as we have non-ASCII in source. True - but it doesn't have to be the "correct" encoding. If you declared your source as latin-1, the effect is the same on byte string literals, but not on Unicode literals. In that sense,

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Martin v. Löwis
> That's a significant improvement. It still decodes os.environ and sys.argv > before you have a chance to call sys.setfilesystemencoding(), but it > appears to be recoverable (with some effort; I can't find any way to re-do > the encoding without manually replacing the surrogates). See PEP 383.

Re: What does Guido want in a GUI toolkit for Python?

2009-06-27 Thread Martin v. Löwis
> I sorta' wish he'd just come out and say, "This is what I think would > be suitable for a GUI toolkit for Python: ...". He is not in the business of designing GUI toolkits, but in the business of designing programming languages. So he abstains from specifying (or even recommending) a GUI library

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-26 Thread Martin v. Löwis
> And I do not see any f3 anywhere except in the doc ref I copy/duped and > in this file. That surely is a bug in your email program - get a better one. Take a look at http://mail.python.org/pipermail/python-list/2009-June/717666.html which displays correctly - maybe you can find a web browser

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-25 Thread Martin v. Löwis
>>> After applying this, the effect remains the same - one big garbage. >> Can you please be more specific? What is "one big garbage"? >> > > There is a square (or some other weird sign) ***PLEASE*** be specific. A square box is something *completely* different than any other weird sign. It is im

Re: print u'\u2013' error on console/terminal

2009-06-25 Thread Martin v. Löwis
> is there a switch to suppress those encoding errors for standard print's > on the console No, there is no such switch. > or a new filter file class necessary? You can wrap sys.stdout with a codecs.StreamWriter, passing "replace" as the error handler. Regards, Martin -- http://mail.python.org

Re: Tkinter - non-ASCII characters in text widgets problem

2009-06-25 Thread Martin v. Löwis
> I've tried various UTF file encoding (also with BOM mark), use of > u"text" Always use u"text". This should work. Everything else might not work. > After applying this, the effect remains the same - one big garbage. Can you please be more specific? What is "one big garbage"? > I'm out of idea

Re: Barbara Liskov wins Turing Award

2009-06-25 Thread Martin v. Löwis
> Python's object model, assignment semantics, and call-by-object > mechanism, and that name, come from CLU. Whether Guido knew of it > directly or not, I do not know. To the extent that the above is part of > the heart of Python, I think Steven's statement stands pretty well. Why do you say that

Re: Build problem on Solaris 9

2009-06-16 Thread Martin v. Löwis
> When I run make after successively running ./configure, I got the > following Error message: > ./Parser/asdl_c.py -c ./Python ./Parser/Python.asdl > /usr/bin/env: No such file or directory > make: *** [Python/Python-ast.c] Error 127 > > /usr/bin/env deos exist > > Can anyone help me with th

Re: Generating a unique filename in the face of unicode filename

2009-06-14 Thread Martin v. Löwis
> where line 175 is the assignment to self.unique_name. After a little > back-and-forth with his user it turns out that her computer's hostname > contains non-ASCII data, so presumably self.hostname is a unicode object. Most likely, it is not. It's rather the hostname encoded in the ANSI code pag

Re: Compiling Python3.1

2009-06-10 Thread Martin v. Löwis
Johannes Bauer wrote: > Martin v. Löwis schrieb: >>> What can I do about that? >> Remove the non-ASCII characters from db.h. > > Ehh... > > $ find -type f | grep -i db.h > ./Modules/unicodename_db.h > ./Modules/unicodedata_db.h > ./Objects/unicodetype_db.h

Re: Compiling Python3.1

2009-06-10 Thread Martin v. Löwis
> What can I do about that? Remove the non-ASCII characters from db.h. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: pypi compatible software

2009-06-07 Thread Martin v. Löwis
> - is code behind pypi.python.org available and why i can't find some > up-to-date official document or howto for private pypi repository > (maybe it exists but i just can't find it)? The code is at https://svn.python.org/packages/ Instructions for installing it are at http://wiki.python.org/m

Re: How to get a window ID in linux using python?

2009-06-03 Thread Martin v. Löwis
> In Linux, we can get window info by executing 'xwininfo' and then > selecting the desired window manually. Can this be done automatically > in python? You can run "xwininfo -tree -root", and then parse the output. HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: FILE object in Python3.0 extension modules

2009-06-03 Thread Martin v. Löwis
> The purpose is to dump the contents of a Python extension type to disk > as binary data using C's fwrite() function. This isn't really possible anymore - the Python IO library has stopped using stdio. There are a couple of alternatives: 1. don't use fwrite(3) to write the binary data, but inste

Re: Problem building 64-bit python 2.6.2 on Solaris 10

2009-06-03 Thread Martin v. Löwis
> I was able to compile ctypes with gcc4sparc without many changes to > the CFLAGS, etc. I had another weird error, but upgrading to the > latest gcc4sparc fixed it. One thing I'm not clear about is how > extensions are built. I noticed that my CFLAGS are not being passed > to gcc when building

Re: Missing codecs in Python 3.0

2009-06-02 Thread Martin v. Löwis
samwyse wrote: > I have a Python 2.6 program (a code generator, actually) that tries > several methods of compressing a string and chooses the most compact. > It then writes out something like this: > { encoding='bz2_codec', data = '...'} > > I'm having two problems converting this to Py3. Firs

Re: Installing 3.1 questions

2009-06-01 Thread Martin v. Löwis
> Seems to work, but I'd like to know where Python installs its items. I'm > wanting to test version 3.1 and downloaded the 'Bzipped source tar ball' > file (not sure of the difference between it and the 'Gzipped' one). Do I > need to run some sort of 'install' command from the Terminal to get

Re: Problem building 64-bit python 2.6.2 on Solaris 10

2009-06-01 Thread Martin v. Löwis
> Ok, so it looks like the only option here is to use LD_LIBRARY_PATH. Not really: there is also crle, and LD_RUN_PATH. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Building PIL under Cygwin & Python 2.5

2009-06-01 Thread Martin v. Löwis
> I think this is an issue that probably needs to be addressed by PIL > maintainers that fully understand the root of the problem (and it > should probably go in the PIL FAQ), but in the meantime does anyone > out there know how to get around this issue? Why do you need to use Cygwin Python? Rega

Re: Python 2.6 for Windows 64-bit AMD

2009-05-30 Thread Martin v. Löwis
> Can anyone shed any light on what's up with this build of Python > 2.6.2? You probably tried to install the 32-bit version of PyParsing; this cannot work with the 64-bit version of Python. You either need to obtain a 64-bit version of pyparsing, or install the 32-bit version of Python. HTH, Mar

Re: Problem building 64-bit python 2.6.2 on Solaris 10

2009-05-29 Thread Martin v. Löwis
>>> I think the problem is it should be built with v9.S for 64-bit, not >>> v8.S. Is that correct? If so, how do I get it to use the right one? >> The Solaris dynamic loader can't find it. Set LD_LIBRARY_PATH or >> LD_RUN_PATH appropriately, or use crle(8). >> > I'm not sure I understand. It app

Re: Problem building 64-bit python 2.6.2 on Solaris 10

2009-05-28 Thread Martin v. Löwis
> I think the problem is it should be built with v9.S for 64-bit, not > v8.S. Is that correct? If so, how do I get it to use the right one? The Solaris dynamic loader can't find it. Set LD_LIBRARY_PATH or LD_RUN_PATH appropriately, or use crle(8). Regards, Martin -- http://mail.python.org/mail

Re: [Python-Dev] PEP 384: Defining a Stable ABI

2009-05-26 Thread Martin v. Löwis
Functions declared in the following header files are not part of the ABI: - cellobject.h - classobject.h - code.h - frameobject.h - funcobject.h - genobject.h - pyarena.h - pydebug.h - symtable.h - token.h - traceback.h >>> I don't th

Re: [Python-Dev] PEP 384: Defining a Stable ABI

2009-05-26 Thread Martin v. Löwis
> Now, with the PEP, I have a feeling that the Python C-API > will in effect be limited to what's in the PEP's idea of > a usable ABI and open up the non-inluded public C-APIs > to the same rate of change as the private APIs. That's certainly not the plan. Instead, the plan is to have a stable ABI

Re: Determining 32 bit vs 64 bit Python and numpy

2009-05-25 Thread Martin v. Löwis
> I am looking for a robust, cross-platform way to determine if I am on a > 32 bit or a 64 bit Python and if the numpy installation is also 32 bit > or 64 bit. You can find out the size of a pointer with struct.calcsize("P") * 8. Numpy will have the same configuration if you can import it. Regard

Re: Which C compiler?

2009-05-18 Thread Martin v. Löwis
Jive Dadson wrote: > I am using Python 2.4. I need to make a native Python extension for > Windows XP. I have both VC++ 6.0 and Visual C++ 2005 Express Edition. > Will VC++ 6.0 do the trick? That would be easier for me, because the > project is written for that one. If not, will the 2005 compil

Re: [Python-Dev] PEP 384: Defining a Stable ABI

2009-05-17 Thread Martin v. Löwis
>>> It also might make it easier for alternate implementations to support >>> the same API so some modules could work cross implementation - but I >>> suspect that's a non-goal of this PEP :). >>> >> >> Indeed :-) I'm also skeptical that this would actually allow >> cross-implementation module

Re: [Python-Dev] PEP 384: Defining a Stable ABI

2009-05-17 Thread Martin v. Löwis
Dino Viehland wrote: > Dirkjan Ochtman wrote: >> It would seem to me that optimizations are likely to require data >> structure changes, for exactly the kind of core data structures that >> you're talking about locking down. But that's just a high-level view, >> I might be wrong. >> > > > In part

Re: [Python-Dev] PEP 384: Defining a Stable ABI

2009-05-17 Thread Martin v. Löwis
Dirkjan Ochtman wrote: > On Mon, May 18, 2009 at 12:07 AM, "Martin v. Löwis" > wrote: >> I fail to see the relationship, so: no effect that I can see. >> >> Why do you think that optimization efforts could be related to >> the PEP 384 proposal? > &

  1   2   3   4   5   6   7   8   9   10   >