ANN: Humerus 2.1

2009-10-02 Thread Greg Ewing
Humerus 2.1 is now available: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Albow/Humerus-2.1.0.zip Online documentation: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Albow/Humerus-2.1.0/doc/ In this version, the code for handling levels has been separated out into a new pair

[ANN]Uliweb 0.0.1a1 released!

2009-10-02 Thread limodou
= Uliweb Introduction = :Author: Limodou limo...@gmail.com .. contents:: About Uliweb Uliweb is a relatively new Python based web framework. Before I started to create this framework,I had used a few other frameworks such as Karrigell,

Re: M2Crypto 0.20.1 won't build on Red Hat Linux

2009-10-02 Thread Heikki Toivonen
John Nagle wrote: The right question is uname --hardware-platform. That returns i386 if running on something emulating a 386, even it it's 64-bit capable. Thanks, I'll make a note that I'll need to clarify that part. With that change, the build runs to completion and and the regression tests

Re: emptying a list

2009-10-02 Thread S.Selvam
On Thu, Oct 1, 2009 at 10:13 PM, Jon Clements jon...@googlemail.com wrote: On 1 Oct, 16:30, lallous lall...@lgwm.org wrote: Hello What is faster when clearing a list? del L[:] or L = [] -- Elias Does it really matter that much? And you're really talking about two

Timestamps for TCP packets?

2009-10-02 Thread Thomas Johnson
Is there any way to get kernel-level timestamps for TCP packets while still using the standard python sockets library for communication? I need to communicate over a TCP connection as easily as possible, but also record the timestamps of the incoming and outgoing timestamps at microsecond or

Re: Open file on remote linux server

2009-10-02 Thread Martien Verbruggen
On Wed, 23 Sep 2009 23:41:35 +0200, Diez B. Roggisch de...@nospam.web.de wrote: The Bear schrieb: Hi I'm looking to do something like this f = f.openfileobj(remotefileloc, localfilelikeobj) my remote files are on a solaris box that i can access using ssh (could prehap request othe

Re: Regular expression to structure HTML

2009-10-02 Thread Bruno Desthuilliers
504cr...@gmail.com a écrit : I'm kind of new to regular expressions, and I've spent hours trying to finesse a regular expression to build a substitution. What I'd like to do is extract data elements from HTML and structure them so that they can more readily be imported into a database. No --

Re: Timestamps for TCP packets?

2009-10-02 Thread Miles Kaufmann
On Oct 2, 2009, at 12:03 AM, Thomas Johnson wrote: Is there any way to get kernel-level timestamps for TCP packets while still using the standard python sockets library for communication? I need to communicate over a TCP connection as easily as possible, but also record the timestamps of the

Re: PyOpenGL and graphics card support

2009-10-02 Thread jefm
that works. Thx below is the output for my system: gluGetString - GLU_VERSION: 1.2.2.0 Microsoft Corporation gluGetString - GLU_EXTENSIONS: GL_EXT_bgra glGetString - GL_VENDOR: NVIDIA Corporation glGetString - GL_RENDERER: GeForce

Re: Regular expression to structure HTML

2009-10-02 Thread Paul McGuire
On Oct 2, 12:10 am, 504cr...@gmail.com 504cr...@gmail.com wrote: I'm kind of new to regular expressions, and I've spent hours trying to finesse a regular expression to build a substitution. What I'd like to do is extract data elements from HTML and structure them so that they can more readily

weak reference to bound method

2009-10-02 Thread Ole Streicher
Hi group, I am trying to use a weak reference to a bound method: class MyClass(object): def myfunc(self): pass o = MyClass() print o.myfunc bound method MyClass.myfunc of __main__.MyClass object at 0xc675d0 import weakref r = weakref.ref(o.myfunc) print r() None This is what

Re: weak reference to bound method

2009-10-02 Thread Peter Otten
Ole Streicher wrote: I am trying to use a weak reference to a bound method: class MyClass(object): def myfunc(self): pass o = MyClass() print o.myfunc bound method MyClass.myfunc of __main__.MyClass object at 0xc675d0 import weakref r = weakref.ref(o.myfunc) print

Re: weak reference to bound method

2009-10-02 Thread Ole Streicher
Hi Thomas, Thomas Lehmann t.lehm...@rtsgroup.net writes: r = weakref.ref(o.myfunc) print r() None k = o.myfunc r = weakref.ref(k) print r() weakref at 00B80750; to 'method' at 00B59918 (myfunc) Don't ask me why! I have just been interested for what you are trying... This is clear:

Re: custom data warehouse in python vs. out-of-the-box ETL tool

2009-10-02 Thread M.-A. Lemburg
Tony Schmidt wrote: Hi, Marc-Andre - well, so far you seem to be the only one suggesting that cross-database joins is the way to go - everyone else has been telling me to build a warehouse. I initially was trying to avoid the warehouse idea to avoid going through the external temporary

Re: weak reference to bound method

2009-10-02 Thread Miles Kaufmann
On Oct 2, 2009, at 1:54 AM, Ole Streicher wrote: I am trying to use a weak reference to a bound method: class MyClass(object): def myfunc(self): pass o = MyClass() print o.myfunc bound method MyClass.myfunc of __main__.MyClass object at 0xc675d0 import weakref r =

Re: weak reference to bound method

2009-10-02 Thread Ole Streicher
Hello Peter, Peter Otten __pete...@web.de writes: Is there an actual use case? I discussed this in the german newsgroup. Here is the use in my class: -8--- import threading import weakref class DoAsync(threading.Thread): def __init__(self,

Re: weak reference to bound method

2009-10-02 Thread Peter Otten
Ole Streicher wrote: Hi Thomas, Thomas Lehmann t.lehm...@rtsgroup.net writes: r = weakref.ref(o.myfunc) print r() None k = o.myfunc r = weakref.ref(k) print r() weakref at 00B80750; to 'method' at 00B59918 (myfunc) Don't ask me why! I have just been interested for what you are

Re: cx_freeze problem on Ubuntu

2009-10-02 Thread Paul Boddie
On 1 Okt, 16:08, John j...@nospam.net wrote: I downloaded the cx_freeze source code fromhttp://cx-freeze.sourceforge.net/into a directory. [...]  From here:http://linux.softpedia.com/get/Programming/Assembler-Tools/cx-Freeze-... the directions state: What about the documentation

Re: weak reference to bound method

2009-10-02 Thread Ole Streicher
Hi Miles, Miles Kaufmann mile...@umich.edu writes: You could also create a wrapper object that holds a weak reference to the instance and creates a bound method on demand: class WeakMethod(object): def __init__(self, bound_method): self.im_func = bound_method.im_func

Re: weak reference to bound method

2009-10-02 Thread Thomas Lehmann
I am trying to use a weak reference to a bound method: class MyClass(object): def myfunc(self): pass o = MyClass() print o.myfunc bound method MyClass.myfunc of __main__.MyClass object at 0xc675d0 import weakref r = weakref.ref(o.myfunc) print r() None This is

Re: Python and lost files

2009-10-02 Thread Dave Angel
Carl Banks wrote: On Sep 30, 11:35 pm, Timothy W. Grove tim_gr...@sil.org wrote: Recently I purchased some software to recover some files which I had lost. (A python project, incidentally! Yes, I should have kept better backups!) They were nowhere to found in the file system, nor in the

setuptools, accessing ressource files

2009-10-02 Thread Patrick Sabin
I use setuptools to create a package. In this package I included some images and I checked that they are in the egg-file. The problem is how can I access the images in the package? I tried pkgutil.get_data, but only got an IOError, because the EGG-INFO directory doesn't exist. I tried

Re: easy question, how to double a variable

2009-10-02 Thread Albert van der Horst
In article fa454992-d61a-4fb7-b684-c8535bce5...@e18g2000vbe.googlegroups.com, daggerdvm dagger...@yahoo.com wrote: you brain needs error checking! Whose brain? At least I know this: Your brain is beyond repair. Go for a brain transplant. Groetjes Albert -- -- Albert van der Horst,

New Python Novice

2009-10-02 Thread baboucarr sanneh
Hello Everyone, My name is Baboucarr ..am from the gambia (west africa)..I just read about python and i want to know how to program with it.. I would like you guys to help me in my road to becoming a python guru..Am a novice so i would welcome any suggestions etc.. Will be posting again

Re: Threaded GUI slowing method execution?

2009-10-02 Thread Dave Angel
Aaron Hoover wrote: div class=moz-text-flowed style=font-family: -moz-fixedI have a wx GUI application that connects to a serial port in a separate thread, reads from the port, and then is supposed to put the data it finds into a queue to be used by the main GUI thread. Generally speaking,

Re: New Python Novice

2009-10-02 Thread Simon Brunning
2009/10/2 baboucarr sanneh sanne...@hotmail.com: Hello Everyone, My name is Baboucarr ..am from the gambia (west africa).. I visited some years back. Friendly people. I just read about python and i want to know how to program with it.. I would like you guys to help me in my road to

Re: Q: sort's key and cmp parameters

2009-10-02 Thread Duncan Booth
Paul Rubin http://phr...@nospam.invalid wrote: Duncan Booth duncan.bo...@invalid.invalid writes: Is there a real-life sorting task that requires (or is far more efficient with) cmp and can't be easily achieved with key and reverse? There is no sorting task that *requires* cmp. If all

Re: weak reference to bound method

2009-10-02 Thread Peter Otten
Ole Streicher wrote: Peter Otten __pete...@web.de writes: class Method(object): def __init__(self, obj, func=None): if func is None: func = obj.im_func obj = obj.im_self This requires that func is a bound method. What I want is to have a universal

Re: weak reference to bound method

2009-10-02 Thread Ole Streicher
Hello Peter, Peter Otten __pete...@web.de writes: What I want is to have a universal class that always works: with unbound functions, with bound function, with lambda expressions, with locally defined functions, That's left as an exercise to the reader ;) Do you have the feeling that there

RE: New Python Novice

2009-10-02 Thread baboucarr sanneh
Thanks simon, Can't wait to get my hands dirty on it.. $LIM $...@dy From: si...@brunningonline.net Date: Fri, 2 Oct 2009 12:32:53 +0100 Subject: Re: New Python Novice To: sanne...@hotmail.com CC: python-list@python.org 2009/10/2 baboucarr sanneh sanne...@hotmail.com: Hello

Re: New Python Novice

2009-10-02 Thread Deven T
On Fri, Oct 2, 2009 at 4:34 PM, baboucarr sanneh sanne...@hotmail.comwrote: Hello Everyone, My name is Baboucarr ..am from the gambia (west africa)..I just read about python and i want to know how to program with it.. I would like you guys to help me in my road to becoming a python guru..Am

RE: New Python Novice

2009-10-02 Thread baboucarr sanneh
Thanks Deven... Appreciate it $LIM $...@dy Date: Fri, 2 Oct 2009 17:37:28 +0530 Subject: Re: New Python Novice From: drt...@gmail.com To: sanne...@hotmail.com CC: python-list@python.org On Fri, Oct 2, 2009 at 4:34 PM, baboucarr sanneh sanne...@hotmail.com wrote: Hello Everyone, My

Re: weak reference to bound method

2009-10-02 Thread Peter Otten
Ole Streicher wrote: Hello Peter, Peter Otten __pete...@web.de writes: What I want is to have a universal class that always works: with unbound functions, with bound function, with lambda expressions, with locally defined functions, That's left as an exercise to the reader ;) Do you

Re: easy question, how to double a variable

2009-10-02 Thread Chris Colbert
I come from a scientific background, so my approach to the solution of this problem is a little different. It makes use of some numerical approximations, but that's not necessarily a bad thing, because it helps avoid singularities. So it could be a little more robust than other solutions

Re: Regular expression to structure HTML

2009-10-02 Thread Stefan Behnel
Paul McGuire wrote: On Oct 2, 12:10 am, 504cr...@gmail.com 504cr...@gmail.com wrote: I'm kind of new to regular expressions, and I've spent hours trying to finesse a regular expression to build a substitution. What I'd like to do is extract data elements from HTML and structure them so that

ANN: Humerus 2.1

2009-10-02 Thread Greg Ewing
Humerus 2.1 is now available: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Albow/Humerus-2.1.0.zip Online documentation: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Albow/Humerus-2.1.0/doc/ In this version, the code for handling levels has been separated out into a new pair

Re: weak reference to bound method

2009-10-02 Thread Ole Streicher
Hi Peter, Peter Otten __pete...@web.de writes: Ole Streicher wrote: Peter Otten __pete...@web.de writes: What I want is to have a universal class that always works: with unbound functions, with bound function, with lambda expressions, with locally defined functions, That's left as an

PyCon 2010

2009-10-02 Thread baboucarr sanneh
Hi Guys...want to register to the PyCon 2010 conference but i cannot have access to the page because it says the page was not found on the server..I have seen also that they can give out financial aid for those who want to go to the conference.am interested in that too as it will be very

Re: weak reference to bound method

2009-10-02 Thread Ole Streicher
Hi Peter, Peter Otten __pete...@web.de writes: class Method(object): def __init__(self, obj, func=None): if func is None: func = obj.im_func obj = obj.im_self This requires that func is a bound method. What I want is to have a universal class that always

Re: weak reference to bound method

2009-10-02 Thread Peter Otten
Ole Streicher wrote: Hi Peter, Peter Otten __pete...@web.de writes: Ole Streicher wrote: Peter Otten __pete...@web.de writes: What I want is to have a universal class that always works: with unbound functions, with bound function, with lambda expressions, with locally defined functions,

Re: Regular expression to structure HTML

2009-10-02 Thread John
On Oct 2, 1:10 am, 504cr...@gmail.com 504cr...@gmail.com wrote: I'm kind of new to regular expressions, and I've spent hours trying to finesse a regular expression to build a substitution. What I'd like to do is extract data elements from HTML and structure them so that they can more readily

Re: Timestamps for TCP packets?

2009-10-02 Thread Grant Edwards
On 2009-10-02, Thomas Johnson thomas.j.john...@gmail.com wrote: Is there any way to get kernel-level timestamps for TCP packets while still using the standard python sockets library for communication? libpcap http://sourceforge.net/projects/pylibpcap/ I need to communicate over a TCP

Re: Q: sort's key and cmp parameters

2009-10-02 Thread Scott David Daniels
Paul Rubin wrote: I still have never understood why cmp was removed. Sure, key is more convenient a lot (or maybe most) of the time, but it's not always. Not just more convenient. cmp will always be N log N, in that _every_ comparison runs your function, while key is linear, in that it is

Re: Regular expression to structure HTML

2009-10-02 Thread Brian D
Yes, John, that's correct. I'm trying to trap and discard the tr row td elements, re-formatting with pipes so that I can more readily import the data into a database. The tags are, of course, initially useful for pattern discovery. But there are other approaches -- I could just replace the tags

Re: Regular expression to structure HTML

2009-10-02 Thread Brian D
The other thought I had was that I may not be properly trapping the end of the first tr row, and the beginning of the next tr row. On Oct 2, 8:38 am, John jmg3...@gmail.com wrote: On Oct 2, 1:10 am, 504cr...@gmail.com 504cr...@gmail.com wrote: I'm kind of new to regular expressions, and

int rich comparisons

2009-10-02 Thread George Sakkis
I stumbled upon the following strangeness (python 2.6.2): getattr(int, '__gt__') method-wrapper '__gt__' of type object at 0x822b7c0 getattr(5, '__gt__') Traceback (most recent call last):n File stdin, line 1, in module AttributeError: 'int' object has no attribute '__gt__' Is this a bug ?

Re: AJAX Widget Framework

2009-10-02 Thread Daniel Fetchinson
I'm looking for an open source, AJAX based widget/windowing framework. Here is what I need: - end user opens up a browser, points it to a URL, logs in - on the server site, sits my application, creating a new session for each user that is logged in - on the server site, I create

Re: Concurrent threads to pull web pages?

2009-10-02 Thread exarkun
On 05:48 am, wlfr...@ix.netcom.com wrote: On Fri, 02 Oct 2009 01:33:18 -, exar...@twistedmatrix.com declaimed the following in gmane.comp.python.general: There's no need to use threads for this. Have a look at Twisted: http://twistedmatrix.com/trac/ Strange... While I can

question about the GC implementation

2009-10-02 Thread Francis Moreau
Hello, I'm looking at gcmodule.c and in move_unreachable() function, the code assumes that if an object has its gc.gc_refs stuff to 0 then it *may* be unreachable. How can an object tagged as unreachable could suddenly become reachable later ? Thanks --

Re: weak reference to bound method

2009-10-02 Thread Ole Streicher
Hi Peter, Peter Otten __pete...@web.de writes: I am a bit surprised that already such a simple problem is virtually unsolvable in python. Btw, have you implemented such a design in another language? No. I think I'd go for a simpler approach, manage the lifetime of MyClass instances

Re: int rich comparisons

2009-10-02 Thread Mark Dickinson
On Oct 2, 3:52 pm, George Sakkis george.sak...@gmail.com wrote: I stumbled upon the following strangeness (python 2.6.2): getattr(int, '__gt__') method-wrapper '__gt__' of type object at 0x822b7c0 getattr(5, '__gt__') Traceback (most recent call last):n   File stdin, line 1, in module

Simple Python struct issue

2009-10-02 Thread Carlo DiCelico
I saw an article on O'Reilly about using NumPy and Dislin to analyze and visualize WAV files. It's a really fantastic article but was a little out of date. I updated the script to work with the newer modules etc but am still having trouble getting it working. The line temp[i,:] =

Re: Simple Python struct issue

2009-10-02 Thread Simon Forman
On Fri, Oct 2, 2009 at 12:07 PM, Carlo DiCelico carlo.dicel...@gmail.com wrote: I saw an article on O'Reilly about using NumPy and Dislin to analyze and visualize WAV files. It's a really fantastic article but was a little out of date. I updated the script to work with the newer modules etc

Re: re.sub do not replace portion of match

2009-10-02 Thread J Wolfe
Thanks Duncan, I did look at that, but it was kinda greek to me. Thanks for pulling out the part I was looking for that should do the trick. Jonathan http://www.python.org/doc/current/library/re.html#re.sub Backreferences, such as \6, are replaced with the substring matched by group 6 in

Re: Simple Python struct issue

2009-10-02 Thread Carlo DiCelico
On Oct 2, 12:15 pm, Simon Forman sajmik...@gmail.com wrote: On Fri, Oct 2, 2009 at 12:07 PM, Carlo DiCelico carlo.dicel...@gmail.com wrote: I saw an article on O'Reilly about using NumPy and Dislin to analyze and visualize WAV files. It's a really fantastic article but was a little

Re: Simple Python struct issue

2009-10-02 Thread MRAB
Carlo DiCelico wrote: I saw an article on O'Reilly about using NumPy and Dislin to analyze and visualize WAV files. It's a really fantastic article but was a little out of date. I updated the script to work with the newer modules etc but am still having trouble getting it working. The line

Re: M2Crypto 0.20.1 won't build on Red Hat Linux

2009-10-02 Thread John Nagle
Heikki Toivonen wrote: John Nagle wrote: The right question is uname --hardware-platform. That returns i386 if running on something emulating a 386, even it it's 64-bit capable. Thanks, I'll make a note that I'll need to clarify that part. With that change, the build runs to completion and

Re: Threaded GUI slowing method execution?

2009-10-02 Thread sturlamolden
On 2 Okt, 13:29, Dave Angel da...@ieee.org wrote: Many people have concluded that (in Python) much of what threads are used for should be done with processes. Remember that threads were invented long before multi-core CPUs were common. Java had threads before the VM could support more than one

Fast decimal arithmetic module released

2009-10-02 Thread Stefan Krah
Hi, today I have released the following packages for fast arbitrary precision decimal arithmetic: 1. libmpdec Libmpdec is a C (C++ ready) library for arbitrary precision decimal arithmetic. It is a complete implementation of Mike Cowlishaw's General Decimal Arithmetic

Re: Threaded GUI slowing method execution?

2009-10-02 Thread Ole Streicher
sturlamolden sturlamol...@yahoo.no writes: On 2 Okt, 13:29, Dave Angel da...@ieee.org wrote: If you are worried about speed, chances are you are not using Python anyway. I *do* worry about speed. And I use Python. Why not? There are powerful libraries available. If you still have need for

Re: Threaded GUI slowing method execution?

2009-10-02 Thread sturlamolden
On 2 Okt, 02:51, Aaron Hoover ahoo...@eecs.berkeley.edu wrote: All the thread is doing most of the time is sitting around checking   the serial port for waiting data, reading it, and appending it to a   list when it finds it. Do your threads ever block waiting for I/O? If they do, is the GIL

Re: Threaded GUI slowing method execution?

2009-10-02 Thread sturlamolden
On 2 Okt, 20:19, Ole Streicher ole-usenet-s...@gmx.net wrote: I *do* worry about speed. And I use Python. Why not? There are powerful libraries available. I do as well. But powerful libraries should release the GIL. Let me rephrase that: I am not worried about speed in the part of my code that

Opinions, please, on PEP 8 and local, 3rd party imports

2009-10-02 Thread Philip Semanchuk
Hi all, Our project uses some libraries that were written by 3rd parties (i.e. not us). These libraries fit into a single Python file and live in our source tree alongside other modules we've written. When our app is distributed, they'll be included in the installation. In other words,

Re: Opinions, please, on PEP 8 and local, 3rd party imports

2009-10-02 Thread Duncan Booth
Philip Semanchuk phi...@semanchuk.com wrote: In your Pythonic opinion, should 3rd-party modules that live alongside homegrown code be listed in import category 2 or 3? PEP 8 also starts by saying This document gives coding conventions for the Python code comprising the standard library in

RELEASED Python 2.6.3

2009-10-02 Thread Barry Warsaw
On behalf of the Python community, I'm happy to announce the availability of Python 2.6.3. This is the latest production-ready version in the Python 2.6 series. Somewhere near 100 bugs have been fixed since Python 2.6.2 was released in April 2009. Please see the NEWS file for all the

Re: store encrypted data in sqlite ?

2009-10-02 Thread Jonathan Gardner
On Oct 2, 11:53 am, Stef Mientki stef.mien...@gmail.com wrote: Will this method work always ? Are there better methods ? I SQLite doesn't like raw data (with all its \0 glory), you're out of luck, unfortunately. Base64 encoding is a really good solution for places like this. You are aware,

Re: store encrypted data in sqlite ?

2009-10-02 Thread Carsten Haese
Stef Mientki wrote: hello, I want to store some fields in an sqlite database. I use ezPyCrypto to encrypt and decrypt: User = ['z684684', 'Mientki, Stef', 1,1,0,1,1 ] encryption_key_1 = ezPyCrypto.key ( 512 ) SQL_Base = 'insert or replace into __USERS__ values (' for field in User

Re: epydoc - can I provide multiple dirs to parse

2009-10-02 Thread Jonathan Gardner
On Oct 2, 11:38 am, Medi montas...@gmail.com wrote: Can I present multiple directories to epydoc to process. For example epydoc -option -option -option dir_1 dir_2 dir_3 I know nothing of epydoc. However, it looks like it should be something like: epydoc -option dir_1 -option dir_2

numpy f2py question

2009-10-02 Thread George Trojan
I have a problem with numpy's vectorize class and f2py wrapped old FORTRAN code. I found that the function _get_nargs() in site-packages/numpy/lib/function_base.py tries to find the number of arguments for a function from an error message generated when the function is invoked with no

Re: int rich comparisons

2009-10-02 Thread Robert Kern
George Sakkis wrote: I stumbled upon the following strangeness (python 2.6.2): getattr(int, '__gt__') method-wrapper '__gt__' of type object at 0x822b7c0 getattr(5, '__gt__') Traceback (most recent call last):n File stdin, line 1, in module AttributeError: 'int' object has no attribute

Re: Q: sort's key and cmp parameters

2009-10-02 Thread Paul Rubin
Scott David Daniels scott.dani...@acm.org writes: Most cases are moreeasily done with key, and it is a good idea to make the most accessible way to a sort be the most efficient one. In the rare case that you really want each comparison, the cmp-injection function will do nicely (and can be

Re: Simple Python struct issue

2009-10-02 Thread Carlo DiCelico
On Oct 2, 3:17 pm, Simon Forman sajmik...@gmail.com wrote: On Fri, Oct 2, 2009 at 12:35 PM, Carlo DiCelico carlo.dicel...@gmail.com wrote: On Oct 2, 12:15 pm, Simon Forman sajmik...@gmail.com wrote: On Fri, Oct 2, 2009 at 12:07 PM, Carlo DiCelico carlo.dicel...@gmail.com wrote: I

Re: Simple Python struct issue

2009-10-02 Thread Carlo DiCelico
On Oct 2, 12:49 pm, MRAB pyt...@mrabarnett.plus.com wrote: Carlo DiCelico wrote: I saw an article on O'Reilly about using NumPy and Dislin to analyze and visualize WAV files. It's a really fantastic article but was a little out of date. I updated the script to work with the newer modules

Re: Threaded GUI slowing method execution?

2009-10-02 Thread Aaron Hoover
On Oct 2, 2009, at 12:30 PM, Dave Angel wrote: (you responded off-list, which isn't the way these mailing lists work. So I'm pasting your message back to the list, with my response at the end) Sorry about that - a slip of the reply button. Actually, I was thinking of the subprocess

Multiple Select

2009-10-02 Thread Victor Subervi
Hi; I'm trying to create an HTML select with several options in a form that is posted to a script. I want to enable the user to select multiple options. The problem is I don't know how to call those options in my cgi calls in the script to which it posts. Only one of them gets associated with the

Re: Multiple Select

2009-10-02 Thread Rami Chowdhury
On Fri, 02 Oct 2009 14:25:55 -0700, Victor Subervi victorsube...@gmail.com wrote: Hi; I'm trying to create an HTML select with several options in a form that is posted to a script. I want to enable the user to select multiple options. The problem is I don't know how to call those options

Re: Multiple Select

2009-10-02 Thread Victor Subervi
I have the select called variable these. Whichever option is selected is passed through the cgi: import cgitb; cgitb.enable() import cgi form = cgi.FieldStorage() these = form.getfirst('these', '') As I mentioned before, I get the variable all right. That is not the issue. What is the issue is

Re: Multiple Select

2009-10-02 Thread Ethan Furman
Victor Subervi wrote: I have the select called variable these. Whichever option is selected is passed through the cgi: import cgitb; cgitb.enable() import cgi form = cgi.FieldStorage() these = form.getfirst('these', '') As I mentioned before, I get the variable all right. That is not the

Re: Threaded GUI slowing method execution?

2009-10-02 Thread sturlamolden
On 2 Okt, 22:29, Aaron Hoover ahoo...@eecs.berkeley.edu wrote: My external hardware is actually sending 2000 packets per second right   now (but that can also be changed). Each packet currently contains 6   bytes of data and 6 bytes of overhead. So, 12 bytes per packet * 2000   packets per

Python resident memory retention Evan Jones' improvements

2009-10-02 Thread Matt Ernst
My apologies in advance if this has been addressed before. Google does not presently seem to return search results for this group from more than a couple of months ago. I have some long-running Python processes that slowly increase in resident memory size, and whose resident size goes down only

multiprocessing newbie - semaphore question

2009-10-02 Thread xera121
Hi, I'm interested in this type of programming but need some fundamental questions answered if someone could oblige: In the docs for the mutiprocessing module it mentions right at the beginning about an underlying semaphore system - would MPI2 fit the bill running on a Beowulf cluster? Is the

Re: numpy f2py question

2009-10-02 Thread sturlamolden
On 2 Okt, 22:41, George Trojan george.tro...@noaa.gov wrote: I have a problem with numpy's vectorize class and f2py wrapped old FORTRAN code. I found that the function _get_nargs() in site-packages/numpy/lib/function_base.py tries to find the number of arguments for a function from an error

Re: Fast decimal arithmetic module released

2009-10-02 Thread Raymond Hettinger
[Stefan Krah] today I have released the following packages for fast arbitrary precision decimal arithmetic: Nice. Raymond -- http://mail.python.org/mailman/listinfo/python-list

Re: numpy f2py question

2009-10-02 Thread sturlamolden
http://projects.scipy.org/numpy/ticket/1247 -- http://mail.python.org/mailman/listinfo/python-list

Haskell's new logo, and the idiocy of tech geekers

2009-10-02 Thread Xah Lee
Haskell has a new logo. A fantastic one. Beautiful. For creator, context, detail, see bottom of: • A Lambda Logo Tour http://xahlee.org/UnixResource_dir/lambda_logo.html this is posted here because it relates to various computer software/ language's logo, a subject discussed by me several

Re: Haskell's new logo, and the idiocy of tech geekers

2009-10-02 Thread Kenneth Tilton
Xah Lee wrote: Haskell has a new logo. A fantastic one. Beautiful. For creator, context, detail, see bottom of: • A Lambda Logo Tour http://xahlee.org/UnixResource_dir/lambda_logo.html Cool survey, and yes, that is a nice new one for Haskell. I saw beauty the other day changing an

Re: Python resident memory retention Evan Jones' improvements

2009-10-02 Thread Andrew MacIntyre
Matt Ernst wrote: {...} I thought Evan Jones altered Python to deal with this very problem, and the change went into the release of 2.5. Here is Tim Peters announcing the change: http://mail.python.org/pipermail/python-dev/2006-March/061991.html He included this simple test program to show

Re: Haskell's new logo, and the idiocy of tech geekers

2009-10-02 Thread Pascal J. Bourguignon
Kenneth Tilton kentil...@gmail.com writes: Xah Lee wrote: Haskell has a new logo. A fantastic one. Beautiful. For creator, context, detail, see bottom of: • A Lambda Logo Tour http://xahlee.org/UnixResource_dir/lambda_logo.html Don't do that! If you want to watch the logo, just google

Re: Concurrent threads to pull web pages?

2009-10-02 Thread Kyle Terry
On Thu, Oct 1, 2009 at 6:33 PM, exar...@twistedmatrix.com wrote: On 1 Oct, 09:28 am, nos...@nospam.com wrote: Hello I recently asked how to pull companies' ID from an SQLite database, have multiple instances of a Python script download each company's web page from a remote server,

Re: Opinions, please, on PEP 8 and local, 3rd party imports

2009-10-02 Thread Simon Forman
On Fri, Oct 2, 2009 at 3:50 PM, Philip Semanchuk phi...@semanchuk.com wrote: Hi all, Our project uses some libraries that were written by 3rd parties (i.e. not us). These libraries fit into a single Python file and live in our source tree alongside other modules we've written. When our app is

Re: Q: sort's key and cmp parameters

2009-10-02 Thread Raymond Hettinger
[Paul Rubin] Yes, think of sorting tree structures where you have to recursively compare them til you find an unequal pair of nodes.   I'm not sure what you mean by this. What are the semantics of sorting a tree? Can you outline an example of tree that could be sorted easily with a cmp

Re: Haskell's new logo, and the idiocy of tech geekers

2009-10-02 Thread Kenneth Tilton
Pascal J. Bourguignon wrote: Kenneth Tilton kentil...@gmail.com writes: Xah Lee wrote: Haskell has a new logo. A fantastic one. Beautiful. For creator, context, detail, see bottom of: • A Lambda Logo Tour http://xahlee.org/UnixResource_dir/lambda_logo.html Don't do that! If you want to

organizing your scripts, with plenty of re-use

2009-10-02 Thread bukzor
I would assume that putting scripts into a folder with the aim of re- using pieces of them would be called a package, but since this is an anti-pattern according to Guido, apparently I'm wrong-headed here. (Reference: http://mail.python.org/pipermail/python-3000/2007-April/006793.html ) Say you

Re: int rich comparisons

2009-10-02 Thread Terry Reedy
Robert Kern wrote: George Sakkis wrote: I stumbled upon the following strangeness (python 2.6.2): getattr(int, '__gt__') method-wrapper '__gt__' of type object at 0x822b7c0 getattr(5, '__gt__') Traceback (most recent call last):n File stdin, line 1, in module AttributeError: 'int'

Re: Q: sort's key and cmp parameters

2009-10-02 Thread Paul Rubin
Raymond Hettinger pyt...@rcn.com writes: I'm not sure what you mean by this. What are the semantics of sorting a tree? Can you outline an example of tree that could be sorted easily with a cmp function but not a key function? The idea was that you have a list of trees that you want to sort,

Re: Regular expression to structure HTML

2009-10-02 Thread greg
Brian D wrote: This isn't merely a question of knowing when to use the right tool. It's a question about how to become a better developer using regular expressions. It could be said that if you want to learn how to use a hammer, it's better to practise on nails rather than screws. -- Greg --

Re: removing a post

2009-10-02 Thread Aahz
In article mailman.549.1254045623.2807.python-l...@python.org, Sjoerd Mullender sjo...@acm.org wrote: On 2009-09-26 05:32, Mike L wrote: could you remove this old post, off topic and spam http://www.mail-archive.com/python-list@python.org/msg175722.html You need to put this request to

Re: Haskell's new logo, and the idiocy of tech geekers

2009-10-02 Thread Dave Searles
Xah Lee wrote: Haskell has a new logo. [Blam! It fucking blows because lambda means pure functional] A truly pure functional language would be useless for anything but programming space heaters. Lambda seems not inappropriate on any language that strongly supports a functional style.

[issue7028] Add int.hex for symmetry with float.hex

2009-10-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Can int.hex() and int.fromhex() be added for symmetry? On the face of it, adding int.hex (and presumably also long.hex for 2.x) seems reasonable: in general, integers should be acceptable where-ever floats are, and by that argument x.hex()

[issue5097] asyncore.dispatcher_with_send undocumented

2009-10-02 Thread Kandalintsev Alexandre
Kandalintsev Alexandre bug_hun...@messir.net added the comment: Please don't keep this bug open :( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5097 ___

  1   2   >