Re: Queue cleanup

2010-09-05 Thread Paul Rubin
John Nagle na...@animats.com writes: Unoptimized reference counting, which is what CPython does, isn't all that great either. The four big bottlenecks in Python are boxed numbers, attribute lookups, reference count updates, and the GIL. The performance hit of having to lock the refcounts

Re: Subclassing by monkey-patching

2010-09-05 Thread Arnaud Delobelle
Jason jason.hee...@gmail.com writes: [...] Is there a way I can write the subclass but then somehow... extend an existing instance all at once rather than monkeypatch methods on one by one? So I could take an existing instance of a FileMonitor and make it an instance of my subclass? This would

Re: Subclassing by monkey-patching

2010-09-05 Thread Peter Otten
Arnaud Delobelle wrote: Jason jason.hee...@gmail.com writes: [...] Is there a way I can write the subclass but then somehow... extend an existing instance all at once rather than monkeypatch methods on one by one? So I could take an existing instance of a FileMonitor and make it an instance

Re: Question about Reading Files

2010-09-05 Thread Peter Otten
genxtech wrote: Hello. I am still really new to python and I have a project where I am trying to use the data files from another program and write a new program with new user interface and all. My first step was to open one of the files in 'rb' mode and print the contents, but I am

Python 2.7 module path problems on OS X

2010-09-05 Thread Nicholas Cole
Dear List, I have a horrible feeling that this is in some way related to the new user installation directory in 2.7,or some problem with the framework built, but I'm having great trouble with the module search path on 2.7. I usually install modules to install_lib =

Re: Subclassing by monkey-patching

2010-09-05 Thread Jason
On Sep 5, 3:53 pm, Peter Otten __pete...@web.de wrote: m = gio.File(.).monitor_directory() C = type(m) 'C' will not necessarily be 'gio.FileMonitor' — I think the internals of the GIO methods might further subclass it in some way depending on what underlying monitors are available. A

Re: Python 2.7 module path problems on OS X

2010-09-05 Thread Ned Deily
In article aanlkti=zzgomi5nhyzca7x9rbwu==oqzrzr4s876k...@mail.gmail.com, Nicholas Cole nicholas.c...@gmail.com wrote: I have a horrible feeling that this is in some way related to the new user installation directory in 2.7,or some problem with the framework built, but I'm having great

Re: Python 2.7 module path problems on OS X

2010-09-05 Thread Nicholas Cole
On Sun, Sep 5, 2010 at 10:20 AM, Ned Deily n...@acm.org wrote: I'm not sure why you think it is broken.  The Apple 2.6 and the python.org 2.7 have different site-package directories in different locations.  That is to be expected.  The Apple-supplied Python comes with some additional packages

Re: Network and socket programming in python

2010-09-05 Thread mblume
Am Sat, 04 Sep 2010 21:29:49 -0700 schrieb shivram: i want to learn network and socket programming but i would like to do this in python.Reason behind this is that python is very simple and the only language i know . anybody can suggest me which book should i pick. the book should have

High CPU utilization with Pylab

2010-09-05 Thread Madhur
I am trying to plot a runtime graph using pylab. But the very purpose of functionality is lost because of high CPU percentage hogged by plotting the graph. Here is the piece of code which I have written. def timerfunc(ulcm, dlcm): count=0 xaxis=[] yaxis=[] ion() while 1:

Re: Network and socket programming in python

2010-09-05 Thread geremy condra
On Sat, Sep 4, 2010 at 9:29 PM, shivram shivramsha...@gmail.com wrote: i want to learn network and socket programming but i would like to do this in python.Reason behind this is that python is very simple and the only language i know . anybody can suggest me which book should i pick. the book

Re: Question about Reading Files

2010-09-05 Thread Mats Rauhala
On 2010-09-05, genxtech jrmy.l...@gmail.com wrote: I am using Fedora 13. When I run the file command the response is that it is a 'data' file. If there are any tips on how to programatically figure out the format, I would greatly appreciate it. I tried python-magic from the fedora

Re: High CPU utilization with Pylab

2010-09-05 Thread David
Il Sun, 5 Sep 2010 03:05:54 -0700 (PDT), Madhur ha scritto: Is there something which does not makes sense .? 1. How, a computer, is supposed to handle your infinite loop? 2. Running ghraphs shuold be handled in totally different way: look at the stripcharting demo in this zip

Re: Subclassing by monkey-patching

2010-09-05 Thread Peter Otten
Jason wrote: On Sep 5, 3:53 pm, Peter Otten __pete...@web.de wrote: m = gio.File(.).monitor_directory() C = type(m) 'C' will not necessarily be 'gio.FileMonitor' — I think the internals of the GIO methods might further subclass it in some way depending on what underlying monitors are

Re: Speed-up for loops

2010-09-05 Thread BartC
David Cournapeau courn...@gmail.com wrote in message news:mailman.455.1283665528.29448.python-l...@python.org... On Thu, Sep 2, 2010 at 7:02 PM, Michael Kreim mich...@perfect-kreim.de wrote: imax = 10 a = 0 for i in xrange(imax): a = a + 10 print a Unfortunately my Python Code

Re: Network and socket programming in python

2010-09-05 Thread simpu
On Sep 5, 3:29 pm, geremy condra debat...@gmail.com wrote: On Sat, Sep 4, 2010 at 9:29 PM, shivram shivramsha...@gmail.com wrote: i want to learn network and socket programming but i would like to do this in python.Reason behind this is that python is very simple and the only language i

Python [repair_cycorder_mov.py]

2010-09-05 Thread ctops.legal
Trying to learn Python for a specific purpose to repair a quicktime file that's corrupted, is it even possible to create a proof-of- concept python script that generates a valid 'moov' atom from a corrupt .mov video ?, file size 1.3gb (Kodak camera failed to finalize file).

Python script for repairing .mov file

2010-09-05 Thread ctops.legal
Trying to learn Python for a specific purpose to repair a quicktime file that's corrupted, is it even possible to create a proof-of- concept python script that generates a valid 'moov' atom from a corrupt .mov video ?, file size 1.3gb (Kodak camera failed to finalize file). Mac--

Python script for repairing .mov file ?

2010-09-05 Thread ctops.legal
Trying to learn Python for a specific purpose to repair a quicktime file that's corrupted, is it even possible to create a proof-of- concept python script that generates a valid 'moov' atom from a corrupt .mov video ?, file size 1.3gb (Kodak camera failed to finalize file). Mac--

Re: Python [repair_cycorder_mov.py]

2010-09-05 Thread Steven D'Aprano
On Sun, 05 Sep 2010 05:44:16 -0700, ctops.legal wrote: Trying to learn Python for a specific purpose to repair a quicktime file that's corrupted, is it even possible to create a proof-of- concept python script that generates a valid 'moov' atom from a corrupt .mov video ?, file size 1.3gb

ssh browser? where?

2010-09-05 Thread alex goretoy
why not ssh browser traffic? why use SSL certificate authorities which can't be trusted in the first place? Is SSH not proven to be secure? To this day I have not seen ssh module for say Apache web server, why not? I understand this maybe wrong list to ask this question, but I love you guys so

Re: ssh browser? where?

2010-09-05 Thread Thomas Jollans
On Sunday 05 September 2010, it occurred to alex goretoy to exclaim: why not ssh browser traffic? why use SSL certificate authorities which can't be trusted in the first place? Is SSH not proven to be secure? To this day I have not seen ssh module for say Apache web server, why not? I

Re: ssh browser? where?

2010-09-05 Thread alex goretoy
If we were to use SSH on the web, which is certainly not the point of SSH, we'd still need some kind of certificate authority to make the whole system workable. Yeah, you are correct. I thought about that after having posted these questions. Even though it was SSH there still would be wiggle

Re: Speed-up for loops

2010-09-05 Thread Steven D'Aprano
On Fri, 03 Sep 2010 21:17:44 +0100, BartC wrote: I'm not sure the Python developers were interested in getting fast loops. For-loops which iterate between two numbers are amongst the easiest things to make fast in a language. Yet originally you had to use: for i in range(N): I don't

Re: Python script for repairing .mov file ?

2010-09-05 Thread Almar Klein
On 5 September 2010 14:54, ctops.legal ctops.le...@gmail.com wrote: Trying to learn Python for a specific purpose to repair a quicktime file that's corrupted, is it even possible to create a proof-of- concept python script that generates a valid 'moov' atom from a corrupt .mov video ?, file

Re: Speed-up for loops

2010-09-05 Thread Steven D'Aprano
On Sun, 05 Sep 2010 12:28:47 +0100, BartC wrote: Getting the above kind of code fast requires the interpreter to be clever enough so that it will use native machine operations on a int type instead of converting back and forth between internal representations. Writing for i in

doctest annoyance/puzzle

2010-09-05 Thread Steven D'Aprano
I'm writing a literate programming document, example.txt, which mixes text and code in ReST format: This is my excellent module for making spam. It has one public function, ``make_spam``, which takes a single argument for how much spam to make: from module import make_spam

personal firewall software is blocking the connection

2010-09-05 Thread vsoler
I'am getting this annoying message all the time when using IDLE. ... personal firewall software is blocking the connection When I am editing a source *.py file and I click on F5 (run) I get the above message. What can I do? I am using Norton Internet Security. I try to find if 127.0.0.1 is

IDLE: personal firewall software is blocking the connection

2010-09-05 Thread vsoler
On 5 sep, 18:00, vsoler vicente.so...@gmail.com wrote: I'am getting this annoying message all the time when using IDLE. ...  personal firewall software is blocking the connection When I am editing a source *.py file and I click on F5 (run) I get the above message. What can I do? I am

Re: Python [repair_cycorder_mov.py]

2010-09-05 Thread Albert Hopkins
On Sun, 2010-09-05 at 14:00 +, Steven D'Aprano wrote: By the way, there's no need to send three messages in 10 minutes asking the same question, and adding FORM METHOD links to your post will probably just get it flagged as spam by many people. Apparently it has, as I only got this

Re: Speed-up for loops

2010-09-05 Thread Stefan Behnel
Steven D'Aprano, 05.09.2010 17:00: Of course, a real optimizing compiler would realise that the Pascal code did nothing at all, and compile it all away to an empty a.out file... Which is just one of the reasons why this kind if benchmark provides no insight into anything that should have an

Re: doctest annoyance/puzzle

2010-09-05 Thread Stefan Schwarzer
Hi Steven, On 2010-09-05 17:30, Steven D'Aprano wrote: I run the doctests with: python2.6 -m doctest examples.txt and the first example passes, but the second fails with NameError: make_spam not defined. I run my doctests by calling doctest.testfile(filename) for each file in a

Extracting item from list of tuples?

2010-09-05 Thread Roy Smith
I'm using httplib, and want to get the Location header from the response. The getheaders() method gives you back a list of (name, value) tuples. It would be a lot more convenient if it gave you back a dict, but it is what it is. Anyway, I came up with: location = [t[1] for t in headers

Re: Speed-up for loops

2010-09-05 Thread BartC
Steven D'Aprano st...@remove-this-cybersource.com.au wrote in message news:4c83b425$0$28657$c3e8...@news.astraweb.com... On Sun, 05 Sep 2010 12:28:47 +0100, BartC wrote: It would be nice if you could directly code low-level algorithms in it without relying on accelerators, and not have to

Re: Extracting item from list of tuples?

2010-09-05 Thread Thomas Jollans
On Sunday 05 September 2010, it occurred to Roy Smith to exclaim: I'm using httplib, and want to get the Location header from the response. The getheaders() method gives you back a list of (name, value) tuples. It would be a lot more convenient if it gave you back a dict, but it is what it

Re: Extracting item from list of tuples?

2010-09-05 Thread Philip Semanchuk
On Sep 5, 2010, at 1:09 PM, Roy Smith wrote: I'm using httplib, and want to get the Location header from the response. The getheaders() method gives you back a list of (name, value) tuples. It would be a lot more convenient if it gave you back a dict, but it is what it is. Anyway, I came

Re: Extracting item from list of tuples?

2010-09-05 Thread Peter Otten
Philip Semanchuk wrote: On Sep 5, 2010, at 1:09 PM, Roy Smith wrote: I'm using httplib, and want to get the Location header from the response. The getheaders() method gives you back a list of (name, value) tuples. It would be a lot more convenient if it gave you back a dict, but it is

Re: Queue cleanup

2010-09-05 Thread John Nagle
On 9/4/2010 11:51 PM, Paul Rubin wrote: John Naglena...@animats.com writes: Unoptimized reference counting, which is what CPython does, isn't all that great either. The four big bottlenecks in Python are boxed numbers, attribute lookups, reference count updates, and the GIL. The

Re: Python script for repairing .mov file ?

2010-09-05 Thread ctops.legal
On Sep 5, 8:54 am, ctops.legal ctops.le...@gmail.com wrote: Trying to learn Python for a specific purpose to repair a quicktime file that's corrupted, is it even  possible to create a proof-of- concept python script that generates a valid 'moov' atom from a corrupt .mov video ?, file size

Re: Extracting item from list of tuples?

2010-09-05 Thread Philip Semanchuk
On Sep 5, 2010, at 1:45 PM, Peter Otten wrote: Philip Semanchuk wrote: On Sep 5, 2010, at 1:09 PM, Roy Smith wrote: I'm using httplib, and want to get the Location header from the response. The getheaders() method gives you back a list of (name, value) tuples. It would be a lot more

Re: Python script for repairing .mov file ?

2010-09-05 Thread ctops.legal
On Sep 5, 8:54 am, ctops.legal ctops.le...@gmail.com wrote: Trying to learn Python for a specific purpose to repair a quicktime file that's corrupted, is it even  possible to create a proof-of- concept python script that generates a valid 'moov' atom from a corrupt .mov video ?, file size

Re: Speed-up for loops

2010-09-05 Thread Stefan Behnel
BartC, 05.09.2010 19:09: I've thought about it (writing an independent interpreter). But I don't know enough of the language, and a lot of it I don't understand (eg. OOP). Besides, I think the language itself deliberately makes it difficult to get it up to speed. Some of the reasons might be the

Re: Python 2.7 module path problems on OS X

2010-09-05 Thread Ned Deily
In article aanlktim4fk9y2mabs3h14z+5rkbxtgmp27vyvmkqe...@mail.gmail.com, Nicholas Cole nicholas.c...@gmail.com wrote: On Sun, Sep 5, 2010 at 10:20 AM, Ned Deily n...@acm.org wrote: I'm not sure why you think it is broken.  The Apple 2.6 and the python.org 2.7 have different site-package

Class changes in circular imports when __name__ == '__main__'

2010-09-05 Thread Spencer Pearson
Hi! I'm writing a package with several files in it, and I've found that isinstance doesn't work the way I expect under certain circumstances. Short example: here are two files. # fileone.py import filetwo class AClass( object ): pass if __name__ == '__main__': a = AClass()

Re: Class changes in circular imports when __name__ == '__main__'

2010-09-05 Thread Arnaud Delobelle
Spencer Pearson speeze.pear...@gmail.com writes: Hi! I'm writing a package with several files in it, and I've found that isinstance doesn't work the way I expect under certain circumstances. Short example: here are two files. # fileone.py import filetwo class AClass( object ): pass

accessing a text file

2010-09-05 Thread Baba
level: beginner how can i access the contents of a text file in Python? i would like to compare a string (word) with the content of a text file (word_list). i want to see if word is in word_list. let's assume the TXT file is stored in the same directory as the PY file. def is_valid_word(word,

Re: accessing a text file

2010-09-05 Thread Nitin Pawar
may be something like this f = open (file,r) data = f.read() f.close if word in data: print word, is present in file On Mon, Sep 6, 2010 at 3:17 AM, Baba raoul...@gmail.com wrote: level: beginner how can i access the contents of a text file in Python? i would like to compare a string

Re: accessing a text file

2010-09-05 Thread Seth Rees
On 09/05/10 16:47, Baba wrote: level: beginner how can i access the contents of a text file in Python? i would like to compare a string (word) with the content of a text file (word_list). i want to see if word is in word_list. let's assume the TXT file is stored in the same directory as

Re: accessing a text file

2010-09-05 Thread Benjamin Kaplan
On Sun, Sep 5, 2010 at 5:47 PM, Baba raoul...@gmail.com wrote: level: beginner how can i access the contents of a text file in Python? i would like to compare a string (word) with the content of a text file (word_list). i want to see if word is in word_list. let's assume the TXT file is

Re: accessing a text file

2010-09-05 Thread MRAB
On 05/09/2010 22:47, Baba wrote: level: beginner how can i access the contents of a text file in Python? That's a very basic question. I suggest you read a tutorial such as Dive Into Python: http://diveintopython.org/toc/index.html i would like to compare a string (word) with the

Re: accessing a text file

2010-09-05 Thread Alexander Kapps
Baba wrote: level: beginner how can i access the contents of a text file in Python? i would like to compare a string (word) with the content of a text file (word_list). i want to see if word is in word_list. let's assume the TXT file is stored in the same directory as the PY file. def

include a file in a python program

2010-09-05 Thread bussiere bussiere
i've got a python.txt that contain python and it must stay as it (python.txt) how can i include it in my program ? import python.txt doesn't work is there a way : a) to make an include(python.txt) b) tell him to treat .txt as .py file that i can make an import python ? i'am using python3 Regards

Re: accessing a text file

2010-09-05 Thread Zhu Sha Zang
Em 05-09-2010 19:06, Alexander Kapps escreveu: Baba wrote: level: beginner how can i access the contents of a text file in Python? i would like to compare a string (word) with the content of a text file (word_list). i want to see if word is in word_list. let's assume the TXT file is

Re: doctest annoyance/puzzle

2010-09-05 Thread Steven D'Aprano
On Sun, 05 Sep 2010 18:41:15 +0200, Stefan Schwarzer wrote: Hi Steven, On 2010-09-05 17:30, Steven D'Aprano wrote: I run the doctests with: python2.6 -m doctest examples.txt and the first example passes, but the second fails with NameError: make_spam not defined. I run my doctests

Re: Class changes in circular imports when __name__ == '__main__'

2010-09-05 Thread Carl Banks
On Sep 5, 1:19 pm, Spencer Pearson speeze.pear...@gmail.com wrote: Hi! I'm writing a package with several files in it, and I've found that isinstance doesn't work the way I expect under certain circumstances. Short example: here are two files. # fileone.py import filetwo class AClass(

Re: include a file in a python program

2010-09-05 Thread Steven D'Aprano
On Mon, 06 Sep 2010 00:57:30 +0200, bussiere bussiere wrote: i've got a python.txt that contain python and it must stay as it (python.txt) Why? Is it against the law to change it? *wink* how can i include it in my program ? import python.txt doesn't work You could write a custom importer

Re: include a file in a python program

2010-09-05 Thread Roy Smith
In article mailman.476.1283727475.29448.python-l...@python.org, bussiere bussiere bussi...@gmail.com wrote: i've got a python.txt that contain python and it must stay as it (python.txt) how can i include it in my program ? import python.txt doesn't work is there a way : a) to make an

Re: include a file in a python program

2010-09-05 Thread Roy Smith
In article 4c8423d3$0$28657$c3e8...@news.astraweb.com, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: fp = open(python.txt) text = fp.read() fp.close() exec(text) But keep in mind that the contents of python.txt will be executed as if you had typed it yourself. If you don't

Re: include a file in a python program

2010-09-05 Thread MRAB
On 05/09/2010 23:57, bussiere bussiere wrote: i've got a python.txt that contain python and it must stay as it (python.txt) how can i include it in my program ? import python.txt doesn't work is there a way : a) to make an include(python.txt) b) tell him to treat .txt as .py file that i can

Re: include a file in a python program

2010-09-05 Thread Terry Reedy
On 9/5/2010 6:57 PM, bussiere bussiere wrote: i've got a python.txt that contain python and it must stay as it (python.txt) If you are working for someone who is such an idiot as to impose such a condition on you, you have our condolences. how can i include it in my program ? import

Re: include a file in a python program

2010-09-05 Thread Terry Reedy
On 9/5/2010 7:12 PM, Steven D'Aprano wrote: fp = open(python.txt) text = fp.read() fp.close() exec(text) But keep in mind that the contents of python.txt will be executed as if you had typed it yourself. If you don't trust the source with your life (or at least with the contents of your

Re: include a file in a python program

2010-09-05 Thread Steven D'Aprano
On Mon, 06 Sep 2010 00:27:13 +0100, MRAB wrote: import imp python = imp.load_source(python, python.txt) Nice! -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Class changes in circular imports when __name__ == '__main__'

2010-09-05 Thread Dave Angel
On 2:59 PM, Carl Banks wrote: On Sep 5, 1:19 pm, Spencer Pearsonspeeze.pear...@gmail.com wrote: Hi! I'm writing a package with several files in it, and I've found that isinstance doesn't work the way I expect under certain circumstances. Short example: here are two files. # fileone.py import

Re: Subclassing by monkey-patching

2010-09-05 Thread Jason
On Sep 5, 6:56 pm, Peter Otten __pete...@web.de wrote: Does it have to be gio.FileMonitor? pyinotify can automatically add new subdirectories out of the box. Well, since it's for a core part of the software, I'd like it to be cross platform — not in the sense of Windows/Mac, but FreeBSD,

Re: Question about Reading Files

2010-09-05 Thread genxtech
On Sep 5, 4:16 am, Peter Otten __pete...@web.de wrote: genxtech wrote: Hello.  I am still really new to python and I have a project where I am trying to use the data files from another program and write a new program with new user interface and all.  My first step was to open one of the

Re: Subclassing by monkey-patching

2010-09-05 Thread Jason
On Sep 6, 8:57 am, Jason jason.hee...@gmail.com wrote: But it's looking more and more like I should give up that particular goal. ...but on the other hand I just knocked together a pyinotify threaded watch system in about 50 lines. It's tempting to tell users of other platforms to write

Re: Class changes in circular imports when __name__ == '__main__'

2010-09-05 Thread Carl Banks
On Sep 5, 5:07 pm, Dave Angel da...@ieee.org wrote: On 2:59 PM, Carl Banks wrote: All of this gets a lot more complicated when packages are involved. Perhaps a better answer would be to import __main__ from the second module. Then what if the module is imported from a different script?

MAKE UPTO $5000 P/M $2000 IN FIRST 30 DAYS! NO INV

2010-09-05 Thread jameser
MAKE UPTO $5000 P/M $2000 IN FIRST 30 DAYS! NO INV Generate $50 to $100 whenever you have a couple of hours free time to spare. You could make $50 or more in the next 2 hours. Starting right Now!Today! GET PAID TO: Take online surveys and make from $5 to $75, or more Participate in focus groups

[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-09-05 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This would also impact the ABI, I suppose. Correct. So it either needs to happen before 3.2, or wait until 4.0, or the introduction of wide hashes needs to be done in a compatible manner, likely requiring two parallel hashing

[issue9767] Failures in json doc examples

2010-09-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: FWIW if something is fixed, it should be the json output. However, I can imagine (without looking at the code) that this would mean a lot of special casing. -- ___ Python tracker

[issue9775] Multiprocessing, logging and atexit play not well together

2010-09-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I'll sort this out with Armin. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9775 ___

[issue9775] Multiprocessing, logging and atexit play not well together

2010-09-05 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: - georg.brandl priority: normal - high versions: +Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9775 ___

[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I don't think this should block 3.2a2. +1 for supporting LLVM in general. BTW, why doesn't it build because of warnings? -- nosy: +georg.brandl priority: release blocker - deferred blocker ___

[issue9779] argparse.ArgumentParser not support unicode in print help

2010-09-05 Thread gkraser
New submission from gkraser gkra...@gmail.com: argparse.ArgumentParser not support unicode in print help. Example: # -*- coding: utf-8 -*- import argparse import unittest class Test1(unittest.TestCase): def test_unicode_desc(self): h = u'Rus Рус' # unicode print h

[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Ned Deily
Ned Deily n...@acm.org added the comment: It's not just LLVM. Building a standard OS X installer on OS X 10.5 or 10.6 (gcc-4.0, 10.4u SDK, i386/ppc, deployment target=10.3), _ctypes fails: *** WARNING: renaming _ctypes since importing it failed:

[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Ned Deily
Ned Deily n...@acm.org added the comment: It's not just LLVM. Building a standard OS X installer on OS X 10.5 (gcc-4.0, 10.4u SDK, i386/ppc, deployment target=10.3) or 10.6 (gcc-4.2, 10.6 SDK, i386/x86_64, dept target 10.6), _ctypes fails: *** WARNING: renaming _ctypes since importing it

[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- Removed message: http://bugs.python.org/msg115631 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9662 ___ ___

[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: OK. Assigning to Ronald for now; he'll have to deal with it when building the binaries anyway. -- assignee: theller - ronaldoussoren nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org

[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-09-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Patch looks like it at least can't make things worse to me. linker_exe should probably also get LDFLAGS (but not LDSHARED). -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org

[issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows

2010-09-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Once again, this is not important enough block 3.2a2. -- priority: release blocker - deferred blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9116

[issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7

2010-09-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Deferring for 3.2a2. -- priority: release blocker - deferred blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8959 ___

[issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX)

2010-09-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: The Unicode import system won't be put in place before 3.2a2, deferring. -- priority: release blocker - deferred blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8611

[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-09-05 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: It is however not important enough to block 3.2a2. -- priority: release blocker - deferred blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9437

[issue9778] Make hash values the same width as a pointer (or Py_ssize_t)

2010-09-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Correct. So it either needs to happen before 3.2, or wait until 4.0, Shouldn't there be a provision for ABI versioning? Or do you suggest bumping to the next major number (4.0, 5.0...) be done on the basis of ABI changes? --

[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-09-05 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: This was broken in r83837 with a patch for issue #5504. -- nosy: +lukasz.langa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9437 ___

[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-09-05 Thread Łukasz Langa
Changes by Łukasz Langa luk...@langa.pl: -- Removed message: http://bugs.python.org/msg115640 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9437 ___

[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: This was broken in r83837 with a patch for issue #5504. -- nosy: +lukasz.langa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9662 ___

[issue9437] can't build extensions with non-default ldflags (e.g. -m32)

2010-09-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Other patch, fixes all failures. -- Added file: http://bugs.python.org/file18758/m32-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9437

[issue3978] ZipFileExt.read() can be incredibly slow; patch included

2010-09-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch has been outdated by other independent performance work on the zipfile module. In Python 3.2, the zipfile module is actually slightly faster than the unzip program: - first with the supplied zeroes.zip file: $ rm -f zeroes time -p

[issue4941] Tell GCC Py_DECREF is unlikely to call the destructor

2010-09-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The whole approach doesn't seem to bear much fruit. I tried to apply again likely_decref.diff and got a 0% performance change on 3.2 (on a Core i3 processor). -- resolution: - rejected status: open - closed

[issue4194] default subprocess.Popen buffer size

2010-09-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The subprocess doc now has a note about buffering and performance issues, closing. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org

[issue1568] PATCH: Armin's attribute lookup caching for 3.0

2010-09-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Closing: Neil's algorithm is not different from what is already in 3.2, except for the additional type_attrcache_callback() which probably doesn't make a difference in normal workloads. -- resolution: accepted - out of date status: open

[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-09-05 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Fixing the alloc_closure error is easy enough: Index: ../setup.py === --- ../setup.py (revision 84528) +++ ../setup.py (working copy) @@ -1653,7 +1653,9 @@

[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-09-05 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: Please find attached a fix for #9662. Some explanation is in order: - the Windows, Linux and OS X implementations of FFI included in the SVN are different in terms of maturity - Thomas originally when fixing #5504 used a bit of functionality

[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I'm looking into this issue. One problem is that the version of libffi used on OSX is no longer in sync with the version that is used on other platforms. The version that is used on OSX does not have some of the symbols expected by

[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: Ronald, please see #5504. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9662 ___ ___

[issue1677872] Efficient reverse line iterator

2010-09-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Suggestions: - do it on BufferedReader, rather than TextIOWrapper: if you want full-speed scanning of log files, you probably want to open them in binary mode - rather than implementing a full-blown iterator, you can start with simple

[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-09-05 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Łukasz' patch fixes the issue for me. As the patch only affects code-paths used on OSX (patches to the libffi version for OSX and an #ifdef that makes OSX use ffi_prep_closure instead of ffi_prep_closure_loc) I intend to commit the

[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-05 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Thanks! That patch fixes the issue for me and I will commit it later today. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9662

[issue1677872] Efficient reverse line iterator

2010-09-05 Thread Guido van Rossum
Changes by Guido van Rossum gu...@python.org: -- nosy: -gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1677872 ___ ___ Python-bugs-list

  1   2   >