ANN: unicode 0.9.4

2010-02-14 Thread garabik-news-2005-05
unicode is a simple python command line utility that displays properties for a given unicode character, or searches unicode database for a given name. It was written with Linux in mind, but should work almost everywhere (including MS Windows and MacOSX), UTF-8 console is recommended. The

moin 1.8.7 released - important security and bug fixes

2010-02-14 Thread Reimar Bauer
MoinMoin 1.8.7 is a security bug fix release. Please update as soon as possible. See http://moinmo.in/MoinMoinDownload for the release archive and the change log. BTW, we still need much more people helping with cleaning up on master19.moinmo.in. So, especially if you speak some non-english

Re: Modifying Class Object

2010-02-14 Thread Steve Howell
On Feb 10, 6:16 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Alf, although your English in this forum has been excellent so far, I understand you are Norwegian, so it is possible that you aren't a native English speaker and possibly unaware that quotation marks are

Re: Modifying Class Object

2010-02-14 Thread Stephen Hansen
On Sat, Feb 13, 2010 at 7:59 AM, Michael Sparks spark...@gmail.com wrote: Hi Alf, On Feb 12, 8:22 pm, Alf P. Steinbach al...@start.no wrote: Thanks for the effort at non-flaming discussion, it *is* appreciated. I would appreciate it if you tried to be non-flaming yourself, since you

Re: Modifying Class Object

2010-02-14 Thread Stephen Hansen
On Sun, Feb 14, 2010 at 12:15 AM, Steve Howell showel...@yahoo.com wrote: On Feb 10, 6:16 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Alf, although your English in this forum has been excellent so far, I understand you are Norwegian, so it is possible that you aren't

Re: plugin / intra process communication system

2010-02-14 Thread Paul Kölle
Am 13.02.2010 10:50, schrieb Florian Ludwig: Hi, I'm looking for a module/plugin/intra-process-communication/hook system for python. Maybe someone here could point me to some project I missed or might have some good ideas if I end up implementing it myself. Most systems I have found are one to

Re: Hashing in python

2010-02-14 Thread Martin v. Loewis
floor(x) returns an integer Why do you say that? Assuming you are talking about math.floor, it works differently for me: py math.floor(10.0/3) 3.0 Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

problem with floats and calculations

2010-02-14 Thread Karsten Goen
hey all, I got a problem with floats and calculations. I made an mini-application where you get random questions with some science calculations in it So the user can type in his result with the values given by random creation. And the user value is compared against the computer value... the

Re: Hashing in python

2010-02-14 Thread Martin v. Loewis
CELL_SIZE = 4 def key(point): return ( int((floor(point[0]/CELL_SIZE))*CELL_SIZE), int((floor(point[1]/CELL_SIZE))*CELL_SIZE), int((floor(point[2]/CELL_SIZE))*CELL_SIZE) ) Since python allows keys to be tuples, I think that this should work. Is

Re: problem with floats and calculations

2010-02-14 Thread Stefan Krah
Karsten Goen karsten.g...@googlemail.com wrote: hey all, I got a problem with floats and calculations. I made an mini-application where you get random questions with some science calculations in it So the user can type in his result with the values given by random creation. And the user value

Re: problem with floats and calculations

2010-02-14 Thread Karsten Goen
also this doesn't help, there are still errors in the accuracy. Isn't there a perfect way to do such calculations? Karsten Goen karsten.g...@googlemail.com wrote: hey all, I got a problem with floats and calculations. I made an mini-application where you get random questions with some

Re: MemoryError, can I use more?

2010-02-14 Thread Laszlo Nagy
2010.02.13. 17:40 keltezéssel, Diez B. Roggisch írta: Am 13.02.10 17:18, schrieb Anssi Saari: Nobodynob...@nowhere.com writes: A single process can't use much more than 2GiB of RAM without a 64-bit CPU and OS. That's not really true. Even Windows XP has the /3GB boot option to allow 3 GiB

Re: problem with floats and calculations

2010-02-14 Thread Mark Lawrence
[fix top posting] Karsten Goen karsten.g...@googlemail.com wrote: hey all, I got a problem with floats and calculations. I made an mini-application where you get random questions with some science calculations in it So the user can type in his result with the values given by random creation.

Re: problem with floats and calculations

2010-02-14 Thread Stefan Krah
Karsten Goen karsten.g...@googlemail.com wrote: also this doesn't help, there are still errors in the accuracy. Isn't there a perfect way to do such calculations? The hint I gave you removes the most egregious error in your program. You still have to quantize the result of (c*var*d) / b) if you

How to solve an LCP (linear complementarity problem) in python ?

2010-02-14 Thread abent
Is there a good library to numericly solve an LCP in python ? (http://en.wikipedia.org/wiki/Linear_complementarity_problem) An example would be very helpful because most libraries seem to only solve QP's. I need this for computing 2d contact forces in a rigid body simulation. --

Re: plugin / intra process communication system

2010-02-14 Thread Florian Ludwig
On Sun, 2010-02-14 at 10:16 +0100, Paul Kölle wrote: Am 13.02.2010 10:50, schrieb Florian Ludwig: Hi, I'm looking for a module/plugin/intra-process-communication/hook system for python. Maybe someone here could point me to some project I missed or might have some good ideas if I end up

LaTeX parser and pstricks generator in python

2010-02-14 Thread Laurent Claessens
Hi all. I just put online a first version of two tools that combine LaTeX and python. The first one, phystricks[1], is a python module intended to generate pstricks code. The main features are * you don't have to know pstricks (but you need to have some basics in python) * you have python

problem with QtSignals object has no attribute 'emit'

2010-02-14 Thread News123
Hi, I'm having a rather small code snippet, where I create pyQT signals. I manage creating a signal as class attribute, but I can't create a list of signals or a signal as object.member. from PyQt4.QtGui import * from PyQt4.QtCore import * class MyWin(QMainWindow): clssig =

Re: How to solve an LCP (linear complementarity problem) in python ?

2010-02-14 Thread Helmut Jarausch
On 02/14/10 12:52, abent wrote: Is there a good library to numericly solve an LCP in python ? (http://en.wikipedia.org/wiki/Linear_complementarity_problem) An example would be very helpful because most libraries seem to only solve QP's. I need this for computing 2d contact forces in a rigid

Re: problem with QtSignals object has no attribute 'emit'

2010-02-14 Thread Phil Thompson
On Sun, 14 Feb 2010 13:17:40 +0100, News123 news...@free.fr wrote: Hi, I'm having a rather small code snippet, where I create pyQT signals. I manage creating a signal as class attribute, but I can't create a list of signals or a signal as object.member. from PyQt4.QtGui import * from

Re: Modifying Class Object

2010-02-14 Thread Steven D'Aprano
On Sat, 13 Feb 2010 23:45:47 -0800, Steve Howell wrote: The term pointer is very abstract. Please give me a concrete definition of a pointer. A programming language data type whose value directly specifies (or points to) another value which is stored elsewhere in the computer memory. I

Python Optimization

2010-02-14 Thread mukesh tiwari
Hello everyone. I am new to python and previously i did programming in c/c++.Could some one please help me to improve the run time for this python program as i don't have idea how to optimized this code.This code also seems to be more unpythonic so how to make it look like more pythonic . I am

Re: Python Optimization

2010-02-14 Thread Mark Lawrence
mukesh tiwari wrote: Hello everyone. I am new to python and previously i did programming in c/c++.Could some one please help me to improve the run time for this python program as i don't have idea how to optimized this code.This code also seems to be more unpythonic so how to make it look like

Re: Hashing in python

2010-02-14 Thread MRAB
Martin v. Loewis wrote: floor(x) returns an integer Why do you say that? Assuming you are talking about math.floor, it works differently for me: py math.floor(10.0/3) 3.0 I've just double-checked. It returns a float in Python 2.x and an int in Python 3.x. (I recently switched to Python

Re: plugin / intra process communication system

2010-02-14 Thread Diez B. Roggisch
Am 14.02.10 13:05, schrieb Florian Ludwig: On Sun, 2010-02-14 at 10:16 +0100, Paul Kölle wrote: Am 13.02.2010 10:50, schrieb Florian Ludwig: Hi, I'm looking for a module/plugin/intra-process-communication/hook system for python. Maybe someone here could point me to some project I missed or

Re: Python Optimization

2010-02-14 Thread Mark Dickinson
On Feb 14, 4:53 pm, mukesh tiwari mukeshtiwari.ii...@gmail.com wrote: Hello everyone. I am new to python and previously i did programming in c/c++.Could some one please help me to improve the run time for this python program as i don't have idea how to optimized this code. [...] How much of a

Re: Modifying Class Object

2010-02-14 Thread Steve Howell
On Feb 14, 7:11 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Sat, 13 Feb 2010 23:45:47 -0800, Steve Howell wrote: The term pointer is very abstract.  Please give me a concrete definition of a pointer. A programming language data type whose value directly specifies (or

Comparing file last access date

2010-02-14 Thread kak...@gmail.com
Hi to all, what i want is to search a folder, and if the last access date of the files in that folder is greater than, lets say 7 days, those files deleted. (Somekind of a file cleaner script) I had problems with converting now = today = datetime.date.today() and stats = os.stat(file)

Re: Python Optimization

2010-02-14 Thread Aahz
In article 363498c7-3575-4f1e-ad53-d9cd10c8d...@q16g2000yqq.googlegroups.com, Mark Dickinson dicki...@gmail.com wrote: (2) Obvious things: use range rather than xrange in your loops. Um, what? You meant the reverse, surely? -- Aahz (a...@pythoncraft.com) *

Re: Comparing file last access date

2010-02-14 Thread MRAB
kak...@gmail.com wrote: Hi to all, what i want is to search a folder, and if the last access date of the files in that folder is greater than, lets say 7 days, those files deleted. (Somekind of a file cleaner script) I had problems with converting now = today = datetime.date.today() and stats =

Re: shelve.open generates (22, 'Invalid argument') Os X 10.5 with Python 2.5

2010-02-14 Thread Aahz
In article 7a9d26a8-0a9f-4bf3-bf50-0ac5e337f...@r24g2000yqd.googlegroups.com, seth hkla...@gmail.com wrote: We have a code that creates a simple Python shelve database. We are able to serialize objects and store them in the dbm file. This seem to work the same on Windows XP Python 2.5, Ubuntu

Re: Please help with MemoryError

2010-02-14 Thread Steve Holden
rantingrick wrote: On Feb 12, 4:10 pm, Steve Holden st...@holdenweb.com wrote: Antoine Pitrou wrote: Le Fri, 12 Feb 2010 17:14:57 +, Steven D'Aprano a écrit : On Feb 12, 4:10 pm, Steve Holden st...@holdenweb.com wrote: Antoine Pitrou wrote: Le Fri, 12 Feb 2010 17:14:57 +, Steven

Re: Python Optimization

2010-02-14 Thread Steve Howell
On Feb 14, 9:48 am, Mark Dickinson dicki...@gmail.com wrote: On Feb 14, 4:53 pm, mukesh tiwari mukeshtiwari.ii...@gmail.com wrote: Hello everyone. I am new to python and previously i did programming in c/c++.Could some one please help me to improve the run time for this python program as

Re: Please help with MemoryError

2010-02-14 Thread Steve Howell
On Feb 14, 10:32 am, Steve Holden st...@holdenweb.com wrote: rantingrick wrote: On Feb 12, 4:10 pm, Steve Holden st...@holdenweb.com wrote: Antoine Pitrou wrote: Le Fri, 12 Feb 2010 17:14:57 +, Steven D'Aprano a écrit : On Feb 12, 4:10 pm, Steve Holden st...@holdenweb.com wrote:

Re: Please help with MemoryError

2010-02-14 Thread Steve Howell
On Feb 11, 5:50 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Thu, 11 Feb 2010 15:39:09 -0800, Jeremy wrote: My Python program now consumes over 2 GB of memory and then I get a MemoryError.  I know I am reading lots of files into memory, but not 2GB worth. 2.    

Re: Python Optimization

2010-02-14 Thread Mark Dickinson
On Feb 14, 6:03 pm, a...@pythoncraft.com (Aahz) wrote: In article 363498c7-3575-4f1e-ad53-d9cd10c8d...@q16g2000yqq.googlegroups.com, Mark Dickinson  dicki...@gmail.com wrote: (2) Obvious things: use range rather than xrange in your loops.   Um, what?  You meant the reverse, surely? Er,

Re: Python Optimization

2010-02-14 Thread Mark Dickinson
On Feb 14, 4:53 pm, mukesh tiwari mukeshtiwari.ii...@gmail.com wrote: Hello everyone. I am new to python and previously i did programming in c/c++.Could some one please help me to improve the run time for this python program as i don't have idea how to optimized this code.This code also seems

Re: Python Optimization

2010-02-14 Thread Steve Howell
On Feb 14, 11:52 am, Mark Dickinson dicki...@gmail.com wrote: On Feb 14, 4:53 pm, mukesh tiwari mukeshtiwari.ii...@gmail.com wrote: Hello everyone. I am new to python and previously i did programming in c/c++.Could some one please help me to improve the run time for this python program as

Fighting with subprocess.Popen

2010-02-14 Thread Mr.John
I'm using Python 2.6.2 as packaged with Fedora 12. I'm trying to use subprocess.Popen() to call /usr/bin/pactl, a simple PulseAudio command parser. I'm having a hard time, because it only works part of the time. If pactl gets a blank or invalid command, it says No valid command specified., and

Re: equivalent of Ruby's Pathname?

2010-02-14 Thread Aahz
In article 8fc356e0-f3ed-4a67-9b37-f21561cef...@p13g2000pre.googlegroups.com, Sean DiZazzo half.ital...@gmail.com wrote: On Feb 8, 2:36=A0pm, a...@pythoncraft.com (Aahz) wrote: In article dcace5fc-5ae9-4756-942d-6da7da2f6...@s36g2000prh.googlegroups= .com, Sean DiZazzo =A0half.ital...@gmail.com

Re: Fighting with subprocess.Popen

2010-02-14 Thread Christian Heimes
Mr.John wrote: Below is a test case that demonstrates this. Tests 1 2 concatenate the command and the argument, Tests 3 4 mimic the python docs and use the form Popen([mycmd, myarg], ...), which never seems to work. It doesn't work with shell=True because the shell is not able to interpret

Re: python crash on windows but not on linux

2010-02-14 Thread Roel Schroeven
Op 2010-02-13 13:14, Alf P. Steinbach schreef: * hjebbers: I enlarged the windows page file from 750Kb to 1.5Gb . The crash still happens. btw, the crash does not happen at a peak memory usage. According to windows task manager, at the moment of crash mem usage of my program is 669kb, peak

Re: Function attributes [OT]

2010-02-14 Thread Terry Reedy
On 2/13/2010 8:14 AM, Steve Holden wrote: Gmane is primarily a news (NNTP-based) service, though for reasons best know to the organizers they choose to rename the standard newsgroups to fit their own idea of how the universe should be organized, so there the group becomes

Re: Function attributes [OT]

2010-02-14 Thread Steve Holden
Terry Reedy wrote: On 2/13/2010 8:14 AM, Steve Holden wrote: Gmane is primarily a news (NNTP-based) service, though for reasons best know to the organizers they choose to rename the standard newsgroups to fit their own idea of how the universe should be organized, so there the group becomes

Re: MemoryError, can I use more?

2010-02-14 Thread Ross Ridge
Diez B. Roggisch de...@nospam.web.de writes: No, PAE can be used to access much more memory than 4GB - albeit through paging. AFAIK up to 2^36 Bytes. Anssi Saari a...@sci.fi wrote: That too. I admit, after checking, that you can't go above 3 GiB per process even in server Windows. But for

new python install

2010-02-14 Thread monkeys paw
Upon invoking python, it hangs until Ctrl^C is typed, and then the interactive shell begins. Like so: joemoney% python Python 2.4.6 (#1, Dec 13 2009, 23:45:11) [C] on sunos5 Type help, copyright, credits or license for more information. # Hangs ^^^ at this point until ^C is typed ^C I've

Re: MemoryError, can I use more?

2010-02-14 Thread Diez B. Roggisch
Am 14.02.10 12:28, schrieb Laszlo Nagy: 2010.02.13. 17:40 keltezéssel, Diez B. Roggisch írta: Am 13.02.10 17:18, schrieb Anssi Saari: Nobodynob...@nowhere.com writes: A single process can't use much more than 2GiB of RAM without a 64-bit CPU and OS. That's not really true. Even Windows XP

Re: Modifying Class Object

2010-02-14 Thread Ethan Furman
Steve Howell wrote: On Feb 14, 7:11 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Sat, 13 Feb 2010 23:45:47 -0800, Steve Howell wrote: The term pointer is very abstract. Please give me a concrete definition of a pointer. A programming language data type whose value

FW: MemoryError, can I use more?

2010-02-14 Thread Echavarria Gregory, Maria Angelica
I use the physical and kernel memory boxes in the windows task manager under the performance tab... in that way I can see the exact RAM that just OS and idle processes occupy before I run my app, and then also the limit at which my app pushes the memory... M. Angelica Echavarria-Gregory,

FW: MemoryError, can I use more?

2010-02-14 Thread Echavarria Gregory, Maria Angelica
Dear Chris, One of the machines I tested my app in is 64 bit and happened the same. The RAM consumed by the OS and other processes is already included in the 2.2 I'm telling... my app enters to work when the RAM is already consumed in ~600 MB in the 3- 32 bit machines ... in the 64 bit

Re: Modifying Class Object

2010-02-14 Thread Alf P. Steinbach
* Ethan Furman: Steve Howell wrote: Going back to pointers vs. references, I think the key distinction being made is that pointers allow specific memory manipulation, although I think even there you're really just dealing with abstractions. The address 0x78F394D2 is a little bit closer to the

Re: MemoryError, can I use more?

2010-02-14 Thread Tommy Grav
On Feb 14, 2010, at 7:20 PM, Echavarria Gregory, Maria Angelica wrote: Dear Chris, One of the machines I tested my app in is 64 bit and happened the same. The RAM consumed by the OS and other processes is already included in the 2.2 I'm telling... my app enters to work when the RAM is

Re: new python install

2010-02-14 Thread Tim Chase
monkeys paw wrote: Upon invoking python, it hangs until Ctrl^C is typed, and then the interactive shell begins. Like so: joemoney% python Python 2.4.6 (#1, Dec 13 2009, 23:45:11) [C] on sunos5 Type help, copyright, credits or license for more information. # Hangs ^^^ at this point until ^C

Re: MemoryError, can I use more?

2010-02-14 Thread Dave Angel
Echavarria Gregory, Maria Angelica wrote: Dear Chris, One of the machines I tested my app in is 64 bit and happened the same. The RAM consumed by the OS and other processes is already included in the 2.2 I'm telling... my app enters to work when the RAM is already consumed in ~600 MB in the

Re: MemoryError, can I use more?

2010-02-14 Thread Tommy Grav
On Feb 14, 2010, at 10:16 PM, Dave Angel wrote: There are three different limits at play here. Since you're still not saying how you're measuring usage, we've all been guessing just which one you're hitting. There's physical RAM, virtual address space, and swappable space (swapfile on

[issue7926] Stray parentheses() in context manager what's new doc

2010-02-14 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Fixed in r78182. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7926 ___

[issue7927] SSL socket is not closed properly

2010-02-14 Thread Péter Szabó
New submission from Péter Szabó pts...@gmail.com: Here is how to reproduce: import socket import ssl sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sslsock = ssl.SSLSocket(sock) assert sslsock._sslobj is None sslsock.connect(('www.gmail.com', 443)) assert isinstance(sslsock._sslobj,

[issue7928] String formatting: grammar wrongly limits [index] to integer

2010-02-14 Thread Edward Welbourne
New submission from Edward Welbourne e...@chaos.org.uk: http://docs.python.org/library/string.html#formatstrings field_name::= (identifier | integer) (. attribute_name | [ element_index ])* element_index ::= integer Subsequent text indicates __getitem__() is used but does not

[issue7926] Stray parentheses() in context manager what's new doc

2010-02-14 Thread Edward Welbourne
Edward Welbourne e...@chaos.org.uk added the comment: The third change removes the early uses of object from: quote Finally, the closing(object)() function returns object so that it can be bound to a variable, and calls object.close at the end of the block. /quote leaving the last use

[issue7923] StreamHandler and FileHandler located in logging, not in logging.handlers

2010-02-14 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: These changes have already been made in trunk (see r68624, r76869), just not backported to release26-maint. -- resolution: - wont fix status: open - closed ___ Python tracker

[issue7928] String formatting: grammar wrongly limits [index] to integer

2010-02-14 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: georg.brandl - eric.smith nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7928 ___

[issue7926] Stray parentheses() in context manager what's new doc

2010-02-14 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, should be fine now in r78188. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7926 ___

[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-02-14 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Yes, adding carefully placed (size_t) casts seems like the right way to solve the problem. I've fixed all (I think) the warnings in r78183, r78184, r78189. I also fixed one case (unrelated to this issue) of potential undefined behaviour

[issue7926] Stray parentheses() in context manager what's new doc

2010-02-14 Thread Edward Welbourne
Edward Welbourne e...@chaos.org.uk added the comment: Nice :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7926 ___ ___ Python-bugs-list

[issue5651] OS X Installer: add checks to ensure proper Tcl configuration during build

2010-02-14 Thread Katrine Whiteson
Katrine Whiteson katrinewhite...@gmail.com added the comment: Hi, Wow, thank you for noticing this. I tried to install python 2.6.4 with the mac dmg, but couldn't figure out where it was installed. I hunted around and made a link to a python 2.6 that I found - it must have been a

[issue7930] pydoc.stripid doesn't strip ID in py25, py26, py31

2010-02-14 Thread Michael Newman
New submission from Michael Newman michael.b.new...@gmail.com: I found that pydoc.stripid doesn't strip the ID in Python 2.5, 2.6, and 3.1. I assume the problem is probably present in 2.7 and 3.2/dev. For a little history, see this older issue back for Python 2.3:

[issue7932] print statement delayed IOError when stdout has been closed

2010-02-14 Thread tholzer
New submission from tholzer thol...@wetafx.co.nz: When printing to a closed stdout file descriptor, the print statement only raises an IOError at character 8192. The expected behaviour is that IOError gets raised immediately (i.e. on the first character). Compare this behaviour to writing to

[issue7932] print statement delayed IOError when stdout has been closed

2010-02-14 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: This is not a bug. The output stream gets buffered, and that it is closed is only detected when a flush is attempted. Use the -u option if you want unbuffered stdout. It is, however, a bug that Python 2.6 apparently fails to flush the