Re: Performance: sets vs dicts.

2010-09-03 Thread Arnaud Delobelle
Terry Reedy tjre...@udel.edu writes: On 9/1/2010 8:11 PM, John Bokma wrote: [...] Uhm, O(1) /is/ constant time, see page 45 of Introduction to Algorithms, 2nd edition. Given that the Wikipedia article references that section also, I wonder if it really disagrees with the definition above.

python database

2010-09-03 Thread shai garcia
can you pls help me to make a database program in python? It is a Quiz system which is database driven. The program has a choices which add question, edit, delete, list, take a quiz, quiz results, and exit. in take a quiz choice,questions should be randomly displayed and the result and name of

python database

2010-09-03 Thread shai garcia
can you pls help me to make a database program in python? It is a Quiz system which is database driven. The program has a choices which add question, edit, delete, list, take a quiz, quiz results, and exit. in take a quiz choice,questions should be randomly displayed and the result and name of

Re: Obscure MySQLdb question - duplicating a database handle

2010-09-03 Thread Lawrence D'Oliveiro
In message 4c801218$0$1622$742ec...@news.sonic.net, John Nagle wrote: The problem is that I want errorlog to commit its message to the table used for error logging, but don't want to commit whatever the caller was doing - that may well revert. Any particular reason you’re using a database

Re: killing all subprocess childrens

2010-09-03 Thread Lawrence D'Oliveiro
In message mailman.351.1283397136.29448.python-l...@python.org, Astan Chee wrote: What I'm trying to do (and wondering if its possible) is to make sure that any children (and any descendants) of this process is killed when the main java process is killed (or dies). How do I do this in

Re: Speed-up for loops

2010-09-03 Thread Ulrich Eckhardt
Tim Wintle wrote: [..] under the hood, cpython does something like this (in psudo-code) itterator = xrange(imax) while 1: next_attribute = itterator.next try: i = next_attribute() except: break a = a + 10 There is one thing that strikes me here: The code claims that

Re: PyPy and RPython

2010-09-03 Thread Stefan Behnel
sarvi, 03.09.2010 07:30: It should technically be possible to allow Python to call a module written in RPython? What's Python here? CPython? Then likely yes. I don't see a benefit, though. It should also compile RPython to a python module.so right? Why (and how) would CPython do that? If

Re: python database

2010-09-03 Thread Ben Finney
shai garcia melodybel...@gmail.com writes: can you pls help me to make a database program in python? Thank you for your interest in Python, and I hope you will have much success as you learn about it. Your best way of using this forum to help you is to ask *specific* questions about problems

Re: PyPy and RPython

2010-09-03 Thread John Nagle
On 9/2/2010 10:30 PM, sarvi wrote: On Sep 2, 2:19 pm, John Naglena...@animats.com wrote: On 9/2/2010 1:29 AM, sarvi wrote: When I think about it these restrictions below seem a very reasonable tradeoff for performance. Yes. And I can use this for just the modules/sections that are

Re: Speed-up for loops

2010-09-03 Thread Stefan Behnel
Ulrich Eckhardt, 03.09.2010 08:52: Tim Wintle wrote: [..] under the hood, cpython does something like this (in psudo-code) itterator = xrange(imax) while 1: next_attribute = itterator.next try: i = next_attribute() except: break a = a + 10 There is one thing that

pyqt unhandled RuntimeError \no access to protected functions or signals for objects not created from Python

2010-09-03 Thread luca72
Hello i have also write to pyqt mailing list but maybe you can help me to solve this question: I have write a tcpserver but wheni try to read by the signal readyRead() e get the error this the part of the program: def nuova_connessione(self): print 'Nuova connessione'

Re: bisection method: Simulating a retirement fund

2010-09-03 Thread Baba
On Sep 2, 11:10 pm, MRAB pyt...@mrabarnett.plus.com wrote: Why are you saving 'fund' in SavingsRecord if you're returning just the last and discarding others? Basically you're returning the final value of fund. Hi MRAB ok i agree that this is not be ideal. I should shorten this to ONLY

Re: PyPy and RPython

2010-09-03 Thread sarvi
Well then, wouldn't it make sense for PyPy to use Shedskin and its definition of Restricted Python? I have heard repeatedly that PyPy RPython is very difficult to use. Then why isn't PyPy using Shedskin to compile its PyPy-Jit? Sarvi On Sep 2, 11:59 pm, John Nagle na...@animats.com wrote: On

Re: Speed-up for loops

2010-09-03 Thread Michael Kreim
Hi, thanks a lot for your answers. I learn a lot and I like to sum up your suggestions and show you the results of the time command on my machine: Original code by me: imax = 10 a = 0 for i in xrange(imax): a = a + 10 print a = runs (wall clock time): 1:55.14 Peter Otten

Re: Speed-up for loops

2010-09-03 Thread Stefan Behnel
Michael Kreim, 03.09.2010 11:21: So finally I followed the recommendation of Tim Wintle to use cython. I did not know this before, but I figured out the following: additionWintle2.pyx: def addition(): cdef long imax = 10 cdef long a = 0 cdef long i for i in

Where do I report a bug to the pythonware PIL

2010-09-03 Thread jc.lopes
Does anyone knows what is the proper way to submit a bug report to pythonware PIL? thanks JC Lopes -- http://mail.python.org/mailman/listinfo/python-list

Python for embedded systems development

2010-09-03 Thread VGNU Linux
Hi, Is there anyone using python for embedded systems development ? I have no idea where to start with. Google was of little help. Will appreciate if someone could guide me on from where to start. Regards Vgnu -- http://mail.python.org/mailman/listinfo/python-list

Re: Speed-up for loops

2010-09-03 Thread python
Michael, Thanks for summarizing and sharing your results. Very interesting. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Financial time series data

2010-09-03 Thread Virgil Stokes
A more direct question on accessing stock information from Yahoo. First, use your browser to go to: http://finance.yahoo.com/q/cp?s=%5EGSPC+Components Now, you see the first 50 rows of a 500 row table of information on SP 500 index. You can LM click on 1 -50 of 500

Re: Speed-up for loops

2010-09-03 Thread Hrvoje Niksic
Ulrich Eckhardt eckha...@satorlaser.com writes: Tim Wintle wrote: [..] under the hood, cpython does something like this (in psudo-code) itterator = xrange(imax) while 1: next_attribute = itterator.next try: i = next_attribute() except: break a = a + 10 There is one

Re: MySQL Problem

2010-09-03 Thread Victor Subervi
On Thu, Sep 2, 2010 at 3:02 PM, Ian hobso...@gmaiil.com wrote: On 02/09/2010 19:34, Victor Subervi wrote: for some reason running the command through python *omits* this one data!! The only difference is that a flag in spreadsheets (Temp) is set to 1. Why on earth doesn't it work in

Re: Financial time series data

2010-09-03 Thread Nanjundi
On Sep 2, 1:12 pm, Virgil Stokes v...@it.uu.se wrote:   Has anyone written code or worked with Python software for downloading financial time series data (e.g. from Yahoo financial)? If yes,  would you please contact me. --Thanks, V. Stokes matplotlib has a finance module you can refer to.

Re: python database

2010-09-03 Thread Mike Kent
On Sep 3, 2:36 am, shai garcia melodybel...@gmail.com wrote: can you pls help me to make a database program in python? It's better if you do your homework yourself. You learn more that way. Now, if you have a specific question about some detail of your assignment, and can show us that you've

Re: MySQL Problem

2010-09-03 Thread Richard Arts
These are also mere suggestions. The statements you use in your print statement and the one you use to feed the cursor differ slightly. The latter is missing quotes around your search criterium. Isn't it possible to fetch results row by row and see if the missing row is in the set? That way you

Re: Speed-up for loops

2010-09-03 Thread Tim Wintle
On Fri, 2010-09-03 at 08:52 +0200, Ulrich Eckhardt wrote: Tim Wintle wrote: [..] under the hood, cpython does something like this (in psudo-code) itterator = xrange(imax) while 1: next_attribute = itterator.next try: i = next_attribute() except: break a = a +

Re: MySQL Problem

2010-09-03 Thread Victor Subervi
This is an addendum to my last post. Please observe the following: mysql select * from spreadsheets where Temp=1; +-++---+-++--+ | ID | Client | Multi | Item| Markup | Temp |

Re: MySQL Problem

2010-09-03 Thread Victor Subervi
On Fri, Sep 3, 2010 at 9:25 AM, Richard Arts arts.rich...@gmail.com wrote: These are also mere suggestions. The statements you use in your print statement and the one you use to feed the cursor differ slightly. The latter is missing quotes around your search criterium. Isn't it possible to

Re: Financial time series data

2010-09-03 Thread Frederic Rentsch
On Fri, 2010-09-03 at 13:29 +0200, Virgil Stokes wrote: A more direct question on accessing stock information from Yahoo. First, use your browser to go to: http://finance.yahoo.com/q/cp?s=% 5EGSPC+Components Now, you see the first 50 rows of a 500 row table of information on SP 500

IDLE / Black frame on Mac

2010-09-03 Thread Kristoffer Føllesdal
Hi I am new to python and have installed python 3.1.2. I have began using IDLE and like it very good. But when an IDLE window is active. There is a thick black frame around the white text field. Is there some way I can get rid of this frame? The frame is very distracting when I write.

Re: Where do I report a bug to the pythonware PIL

2010-09-03 Thread Alex Willmer
On Sep 3, 10:35 am, jc.lopes jc.lo...@gmail.com wrote: Does anyone knows what is the proper way to submit a bug report to pythonware PIL? thanks JC Lopes The Python Image SIG list http://mail.python.org/mailman/listinfo/image-sig Free Support: If you don't have a support contract, please

Re: Where do I report a bug to the pythonware PIL

2010-09-03 Thread Robert Kern
On 9/3/10 4:35 AM, jc.lopes wrote: Does anyone knows what is the proper way to submit a bug report to pythonware PIL? http://mail.python.org/mailman/listinfo/image-sig -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own

pyqt signals

2010-09-03 Thread luca72
Hello i have write this but i not able to connect the emit of the class Socket to the Form class, can you help me? class Socket(QtNetwork.QTcpSocket): def __init__(self, parent=None): super(Socket, self).__init__(parent) self.connect(self, QtCore.SIGNAL(readyRead()),

Re: Performance: sets vs dicts.

2010-09-03 Thread ru...@yahoo.com
On 09/02/2010 02:47 PM, Terry Reedy wrote: On 9/1/2010 10:57 PM, ru...@yahoo.com wrote: So while you may think most people rarely read the docs for basic language features and objects (I presume you don't mean to restrict your statement to only sets), I and most people I know *do* read

Re: Performance: sets vs dicts.

2010-09-03 Thread John Bokma
Terry Reedy tjre...@udel.edu writes: On 9/1/2010 8:11 PM, John Bokma wrote: [...] Right. And if 'small values of n' include all possible values, then rejecting a particular O(log n) algorithm as 'unacceptable' relative to all O(1) algorithms is pretty absurd. I have little time, but want

Re: bisection method: Simulating a retirement fund

2010-09-03 Thread MRAB
On 03/09/2010 09:06, Baba wrote: On Sep 2, 11:10 pm, MRABpyt...@mrabarnett.plus.com wrote: Why are you saving 'fund' in SavingsRecord if you're returning just the last and discarding others? Basically you're returning the final value of fund. Hi MRAB ok i agree that this is not be ideal. I

Re: Financial time series data

2010-09-03 Thread Frederic Rentsch
On Fri, 2010-09-03 at 16:48 +0200, Virgil Stokes wrote: On 03-Sep-2010 15:45, Frederic Rentsch wrote: On Fri, 2010-09-03 at 13:29 +0200, Virgil Stokes wrote: A more direct question on accessing stock information from Yahoo. First, use your browser to go to:

New to python - parse data into Google Charts

2010-09-03 Thread alistair
I'm new to python and my programming years are a ways behind me, so I was looking for some help in parsing a file into a chart using the Google Charts API. The file is simply a text file containing: Date, Total Accesses, Unique Accesses. I'd like date across the bottom, access numbers on the

Re: Performance: sets vs dicts.

2010-09-03 Thread Robert Kern
On 9/3/10 12:08 PM, John Bokma wrote: Terry Reedytjre...@udel.edu writes: On 9/1/2010 8:11 PM, John Bokma wrote: [...] Right. And if 'small values of n' include all possible values, then rejecting a particular O(log n) algorithm as 'unacceptable' relative to all O(1) algorithms is pretty

Re: bisection method: Simulating a retirement fund

2010-09-03 Thread Carl Banks
On Sep 2, 1:37 pm, Baba raoul...@gmail.com wrote: level: beginner In this economy, simulating the value of retirement funds with bisection is easy. Look: def retirement_fund_value(n_years,initial_value): for i in xrange(n_years): value /= 2 # - bisect value of fund return

what should __iter__ return?

2010-09-03 Thread ernest
Hi, What is better: def __iter__(self): for i in len(self): yield self[i] or def __iter__(self): return iter([self[i] for i in range(len(self))]) The first one, I would say is more correct, however what if in a middle of an iteration the object changes in length? Then, the

Re: Does MySQLdb rollback on control-C? Maybe not.

2010-09-03 Thread Mike Kent
On Sep 3, 12:22 am, John Nagle na...@animats.com wrote:     I would expect MySQLdb to rollback on a control-C, but it doesn't seem to have done so.   Something is broken. I wouldn't expect it to, I'd expect to roll back on an exception, or commit if not. Perhaps this will help you. I use it

Re: MySQL Problem

2010-09-03 Thread Ian
On 03/09/2010 14:29, Victor Subervi wrote: This is an addendum to my last post. Please observe the following: mysql select * from spreadsheets where Temp=1; +-++---+-++--+ | ID | Client | Multi | Item| Markup | Temp |

Re: New to python - parse data into Google Charts

2010-09-03 Thread Mike Kent
On Sep 3, 1:52 pm, alistair alistair.cal...@gmail.com wrote: I'm new to python and my programming years are a ways behind me, so I was looking for some help in parsing a file into a chart using the Google Charts API. Try this: http://pygooglechart.slowchop.com/ --

Re: Speed-up for loops

2010-09-03 Thread Nobody
On Fri, 03 Sep 2010 11:21:36 +0200, Michael Kreim wrote: An anonymous Nobody suggested to use Numpy. I did not do this, because I am very very new to Numpy and I did not figure out a Numpy specific way to do this. Maybe a Numpy expert has something for me? The problem with giving examples

Re: what should __iter__ return?

2010-09-03 Thread Thomas Jollans
On Friday 03 September 2010, it occurred to ernest to exclaim: Hi, What is better: def __iter__(self): for i in len(self): yield self[i] or def __iter__(self): return iter([self[i] for i in range(len(self))]) The first one, I would say is more correct, however

Re: what should __iter__ return?

2010-09-03 Thread MRAB
On 03/09/2010 20:35, ernest wrote: Hi, What is better: def __iter__(self): for i in len(self): yield self[i] or def __iter__(self): return iter([self[i] for i in range(len(self))]) The first one, I would say is more correct, however what if in a middle of an iteration the

Re: Speed-up for loops

2010-09-03 Thread BartC
Michael Kreim mich...@perfect-kreim.de wrote in message news:mailman.362.1283422325.29448.python-l...@python.org... I was comparing the speed of a simple loop program between Matlab and Python. My Codes: $ cat addition.py imax = 10 a = 0 for i in xrange(imax): a = a + 10 print a

Re: Speed-up for loops

2010-09-03 Thread Stefan Behnel
BartC, 03.09.2010 22:17: for i in range(N): which (if I understood correctly) actually created a list of N objects, populated it with the values 0, 1, 2...N-1 (presumably using a more sensible loop), then iterated between the values of the list! I guess what applies here is special cases

Re: Help needed with Windows Service in Python

2010-09-03 Thread Ian
On 03/09/2010 01:38, Mark Hammond wrote: I expect that the Windows Event Log might have some clues, as would attempting to use it in debug mode. Thanks Mark. The error log holds the trackback - it identified the line with the typo. Now the typo is fixed, the service starts and stops

Date Parsing Question

2010-09-03 Thread Gavin
Hi, I'm using the python-dateutil package : http://labix.org/python-dateutil to parse a set of randomly formatted strings into dates. Because the formats are varied, I can't use time.strptime() because I don't know what the format is upfront. python-dateutil seems to work very well if

Re: Help needed with Windows Service in Python

2010-09-03 Thread Ian
On 02/09/2010 20:55, Edward Kozlowski wrote: On Sep 2, 2:38 pm, Ianhobso...@gmaiil.com wrote: On 02/09/2010 20:06, Edward Kozlowski wrote: On Sep 2, 10:22 am, Ian Hobsoni...@ianhobson.co.ukwrote: Hi All, I am attempting to create a Windows Service in Python. I have the framework

Re: Does MySQLdb rollback on control-C? Maybe not.

2010-09-03 Thread John Nagle
On 9/3/2010 12:41 PM, Mike Kent wrote: On Sep 3, 12:22 am, John Naglena...@animats.com wrote: I would expect MySQLdb to rollback on a control-C, but it doesn't seem to have done so. Something is broken. I wouldn't expect it to, I'd expect to roll back on an exception, or commit if

Re: IDLE / Black frame on Mac

2010-09-03 Thread Kristoffer Føllesdal
*Forgot to tell that I am using a Mac with Snow Leopard. -- http://mail.python.org/mailman/listinfo/python-list

Re: Date Parsing Question

2010-09-03 Thread David Bolen
Gavin gavin.d...@gmail.com writes: python-dateutil seems to work very well if everything is in English, however, it does not seem to work for other languages and the documentation does not seem to have any information about locale support. Probably because I don't think there is much built

Re: New to python - parse data into Google Charts

2010-09-03 Thread alistair
On Sep 3, 12:51 pm, Mike Kent mrmak...@cox.net wrote: On Sep 3, 1:52 pm, alistair alistair.cal...@gmail.com wrote: I'm new to python and my programming years are a ways behind me, so I was looking for some help in parsing a file into a chart using the Google Charts API. Try

Re: Queue cleanup

2010-09-03 Thread Lawrence D'Oliveiro
In message 7xvd6sv0n4@ruckus.brouhaha.com, Paul Rubin wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: AddrObj = PyTuple_GetItem(TheBufferInfo, 0); LenObj = PyTuple_GetItem(TheBufferInfo, 1); the first PyTuple_GetItem succeeds and the second one

Re: Queue cleanup

2010-09-03 Thread Lawrence D'Oliveiro
In message 7xiq2que93@ruckus.brouhaha.com, Paul Rubin wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: Refcounting is susceptable to the same pauses for reasons already discussed. Doesn’t seem to happen in the real world, though. def f(n): from time

Re: Queue cleanup

2010-09-03 Thread Lawrence D'Oliveiro
In message 7xmxs2uez1@ruckus.brouhaha.com, Paul Rubin wrote: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: Whereas garbage collection will happen at some indeterminate time long after the last access to the object, when it very likely will no longer be in the cache, and

Re: Queue cleanup

2010-09-03 Thread Lawrence D'Oliveiro
In message 7xr5heufhb@ruckus.brouhaha.com, Paul Rubin wrote: Java has considerably greater reputation for reliability than C or C++. Wonder why Sun’s licence explicitly forbade its use in danger-critical areas like nuclear power plants and the like, then? Ada is a different story, but

Re: Queue cleanup

2010-09-03 Thread Paul Rubin
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: Java has considerably greater reputation for reliability than C or C++. Wonder why Sun’s licence explicitly forbade its use in danger-critical areas like nuclear power plants and the like, then? Probably because Sun lawyers

Google Adsense Earnings, google adsense tips

2010-09-03 Thread chinnamma
If you control a website and wish to promote it for money at home, therefore the Google AdSense syllabus is inescapable merely in support of you. It has befall a bonus in support of a luck of sites whether they are small or sizeable or form. Taking part in information, this has befall such a all

Google Adsense Earnings, google adsense tips

2010-09-03 Thread chinnamma
It's an untoward information with the purpose of many AdSense users are getting their accounts terminated by the time they've complete nothing unsuitable. Considering the money individual can promote to from operational AdSense employment, the loss of one's bank account can be a real blow.

Google Adsense Earnings, google adsense tips

2010-09-03 Thread chinnamma
I'm pretty certain with the purpose of we all can promote to this allegation - I know quite a luck approaching AdSense. This of track will be authentic in a convinced context. For illustration what time you are conversation to an recluse, someone who doesn't apply AdSense to his or her website, so

Google Adsense Earnings, google adsense tips

2010-09-03 Thread chinnamma
Recently I found I had a a small amount of websites I had basically abandoned, Mostly as the products had befall with a reduction of desirable and were Veto longer worth the effort of promoting. I unfaltering more exactly than Accede to the sites simply sit in attendance price me hosting money -

Re: Queue cleanup

2010-09-03 Thread MRAB
On 04/09/2010 03:21, Paul Rubin wrote: Lawrence D'Oliveirol...@geek-central.gen.new_zealand writes: Java has considerably greater reputation for reliability than C or C++. Wonder why Sun’s licence explicitly forbade its use in danger-critical areas like nuclear power plants and the like,

Re: Queue cleanup

2010-09-03 Thread Paul Rubin
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: GC's for large systems generally don't free (or even examine) individual garbage objects. They copy the live objects to a new contiguous heap without ever touching the garbage, and then they release the old heap. And suddenly

Re: IDLE / Black frame on Mac

2010-09-03 Thread Ned Deily
In article ce4a8c32-29dc-41dd-8606-6a7a4ea88...@g18g2000vbn.googlegroups.com, Kristoffer Follesdal kkf...@gmail.com wrote: *Forgot to tell that I am using a Mac with Snow Leopard. Which version of Python 3.1.2? From the python.org installer? MacPorts? Built from source - if so, which

[issue9750] sqlite3 iterdump fails on column with reserved name

2010-09-03 Thread Marko Kohtala
New submission from Marko Kohtala marko.koht...@gmail.com: Sqlite3 fails to dump a database with column names that are keywords. -- components: Extension Modules files: sqlite3bug.py messages: 115420 nosy: Marko.Kohtala priority: normal severity: normal status: open title: sqlite3

[issue9750] sqlite3 iterdump fails on column with reserved name

2010-09-03 Thread Marko Kohtala
Marko Kohtala marko.koht...@gmail.com added the comment: Here is a patch that may resolve the bug. -- keywords: +patch Added file: http://bugs.python.org/file18721/sqlite3bug.patch ___ Python tracker rep...@bugs.python.org

[issue9749] tuple-to-list conversion

2010-09-03 Thread Pyry Säilä
Pyry Säilä roadrunn...@gmail.com added the comment: Ah, I see. What a stupid error. My apologies. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9749 ___

[issue9750] sqlite3 iterdump fails on column with reserved name

2010-09-03 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +ghaering versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9750 ___ ___

[issue9750] sqlite3 iterdump fails on column with reserved name

2010-09-03 Thread Gerhard Häring
Changes by Gerhard Häring g...@ghaering.de: -- assignee: - ghaering ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9750 ___ ___ Python-bugs-list

[issue4111] Add Systemtap/DTrace probes

2010-09-03 Thread anatoly techtonik
Changes by anatoly techtonik techto...@gmail.com: -- nosy: +techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4111 ___ ___ Python-bugs-list

[issue9750] sqlite3 iterdump fails on column with reserved name

2010-09-03 Thread Marko Kohtala
Marko Kohtala marko.koht...@gmail.com added the comment: The second patch contains also fixes for some places where the rules described in http://www.sqlite.org/lang_keywords.html are not followed. -- Added file: http://bugs.python.org/file18722/sqlite3ident.patch

[issue7077] SysLogHandler can't handle Unicode

2010-09-03 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Fix backported to release27-maint (r84445). Python 2.6 and earlier are in security-fix-only mode. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7077

[issue9576] logging.addLevelName in file-based configurations

2010-09-03 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: No feedback on this after two weeks, so closing. -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9576 ___

[issue9751] _PyInstance_Lookup() defeats its purpose

2010-09-03 Thread Armin Rigo
New submission from Armin Rigo ar...@users.sourceforge.net: _PyInstance_Lookup() is documented as follows: The point of this routine is that it never calls arbitrary Python code, so is always safe: all it does is dict lookups. But of course dict lookups can call arbitrary Python code.

[issue9576] logging.addLevelName in file-based configurations

2010-09-03 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: You set it to won't fix, that's why I didn't give you any feedback. In general, if you provides features programatically *and* via configuration, it makes sense to provide the whole set on both sides. IOW, if you don't want a feature to be

[issue9752] MSVC Compiler warning in Python\import.c

2010-09-03 Thread Daniel Stutzbach
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com: 7..\Python\import.c(1158) : warning C4013: 'mkdir' undefined; assuming extern returning int -- assignee: stutzbach components: Interpreter Core, Windows keywords: easy messages: 115428 nosy: stutzbach priority: low

[issue9726] logging.handlers.RotatingFileHandler: implement preserve log file name extension feature

2010-09-03 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: You can do this by subclassing RotatingFileHandler and overriding doRollover, as per this example: http://plumberjack.blogspot.com/2010/09/using-custom-file-naming-scheme-for.html -- resolution: - wont fix status: open - closed

[issue8420] Objects/setobject.c contains unsafe code

2010-09-03 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Fixed in r84447 -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8420 ___

[issue9576] logging.addLevelName in file-based configurations

2010-09-03 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I set to pending and wontfix to indicate what my proposed resolution was, and to await feedback - sorry for the misunderstanding. The custom levels feature is not intended to be used casually (as it will cause unpredictable behaviour when

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
New submission from Daniel Stutzbach dan...@stutzbachenterprises.com: The errors below show up on my XP machine in Python 3.1 as well as a recent build from the py3k branch. I'm not sure why they *don't* show up on the XP buildbot. fromfd() ultimately calls dup(), so the underlying problem

[issue9744] calling __getattribute__ with wrong instance causes hang up

2010-09-03 Thread Andreas Stührk
Andreas Stührk andy-pyt...@hammerhartes.de added the comment: Actually, Python behaves the way you expect it. The problem is that when that exception is created, Python tries to look up the involved class names. To do that, it tries to get the __class__ attribute (hapens in

[issue9754] assertWarns and assertWarnsRegexp

2010-09-03 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: Similar to assertRaises and assertRaisesRegexp, unittest should provide assertWarns and assertWarnsRegexp, to check that a given callable (or piece of code) triggers a particular warning. Currently, you have to do that manually using a

[issue8649] Py_UNICODE_* functions are undocumented

2010-09-03 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: For this one, I suggest adding something to http://docs.python.org/dev/c-api/unicode.html#plain-py-unicode -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org

[issue9754] assertWarns and assertWarnsRegexp

2010-09-03 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: +1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9754 ___ ___ Python-bugs-list

[issue8654] Improve ABI compatibility between UCS2 and UCS4 builds

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: I just noticed that the previous new patch I uploaded was actually my original patch. Oops. Anyway... In a discussion on the capi list, a few people objected to compiling in Unicode-agnostic mode by default (e.g., it would

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: test_socket.py passes here. I run: python_d.exe -m test.regrtest -v test_socket -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9753

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: I run it the same way. I wonder what's different? :-( I will try to find some time to investigate further. -- ___ Python tracker rep...@bugs.python.org

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: On Windows, socket.dup is implemented using DuplicateHandle. The documentation for DuplicateHandle reads: You should not use DuplicateHandle to duplicate handles to the following objects: * I/O completion ports. No

[issue9744] calling __getattribute__ with wrong instance causes hang up

2010-09-03 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9744 ___

[issue9755] Fix refcounting details in Py3k C API documentation

2010-09-03 Thread Nick Coghlan
New submission from Nick Coghlan ncogh...@gmail.com: As noted in [1] the refcount data for the C API documentation is contained in a separate file at Doc/data/refcounts.dat. This file is not mentioned in Documenting Python and hence has not been correctly updated for Py3k (e.g. none of the

[issue9755] Fix refcounting details in Py3k C API documentation

2010-09-03 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- assignee: - d...@python nosy: +d...@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9755 ___

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment: Following the advice of DuplicateHandle's documentation, I reimplemented dup on Windows using WSADuplicateHandle. Attached is a patch. With the patch, the tests pass on my Windows machine. Would someone like to review the

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Daniel Stutzbach
Changes by Daniel Stutzbach dan...@stutzbachenterprises.com: Added file: http://bugs.python.org/file18724/issue9753.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9753 ___

[issue9753] test_socket.testDup, testFromFd fail on Windows

2010-09-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The documentation of WSASocket(), and the code of PyBluez http://code.google.com/p/pybluez/source/browse/trunk/msbt/_msbt.c#374 both suggest to use the FROM_PROTOCOL_INFO constant. Otherwise, the patch looks good. --

[issue9751] _PyInstance_Lookup() defeats its purpose

2010-09-03 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I'm not sure anyone will be interested in this: it doesn't affect 3.x. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9751

[issue9750] sqlite3 iterdump fails on column with reserved name

2010-09-03 Thread Marko Kohtala
Marko Kohtala marko.koht...@gmail.com added the comment: It also fails if table or column names contain double quote. -- Added file: http://bugs.python.org/file18725/sqlite3bug2.py ___ Python tracker rep...@bugs.python.org

[issue9756] Crash with custom __getattribute__

2010-09-03 Thread Florent Xicluna
New submission from Florent Xicluna florent.xicl...@gmail.com: I found this crash while playing with proxies (thanks haypo). http://code.activestate.com/recipes/496741-object-proxying/ class MyClass(object): def __init__(self): self.pwn = None def __getattribute__(self,

  1   2   3   >