Re: Optional parameter object re-used when instantiating multiple objects

2008-11-16 Thread Aaron Brady
On Nov 17, 12:52 am, Aaron Brady <[EMAIL PROTECTED]> wrote: > On Nov 16, 8:16 pm, Aaron Brady <[EMAIL PROTECTED]> wrote: > > On Nov 16, 12:52 am, Steven D'Aprano <[EMAIL PROTECTED] > > > I've given practical reasons why the > > > Python choice is better. If you want default argument to be created f

Re: Official definition of call-by-value (Re: Finding the instancereference...)

2008-11-16 Thread Hendrik van Rooyen
"Steve Holden" <[EMAIL PROTECTED]> wrote: > There's also the question, if you say that an object is different from > its value, of determining what the value's value is ... This one is easy - its obviously the value that is returned when the value is returned when you call for the value that you

Re: special editor support for indentation needed.

2008-11-16 Thread Jeremiah Dodds
On Mon, Nov 17, 2008 at 1:36 AM, John Yeung <[EMAIL PROTECTED]>wrote: > On Nov 15, 8:50 pm, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote: > > well, therein lies the rub. I don't know lisp, > > I don't know Emacs internals let alone python mode. > > Is vr-mode a "major" mode? If so, I suppose it

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-16 Thread Aaron Brady
On Nov 16, 8:16 pm, Aaron Brady <[EMAIL PROTECTED]> wrote: > On Nov 16, 12:52 am, Steven D'Aprano <[EMAIL PROTECTED] > > I've given practical reasons why the > > Python choice is better. If you want default argument to be created from > > scratch when the function is called, you can get it with lit

Re: inspect.findsource problem with llinecache

2008-11-16 Thread Rafe
On Nov 15, 1:29 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 12 Nov 2008 05:22:55 -0200,Rafe<[EMAIL PROTECTED]> escribió: > > > I think I have discovered two bugs with the inspect module and I would > > like to know if anyone can spot any traps in my workaround. > > They look like r

Looking for Advice: Creation vs Access in OO Models

2008-11-16 Thread Rafe
Hi, I'm going to try and keep this as general as possible. I'm building an object model/API for creating and working with 'things' (I'm actually working with a 3D application through COM, so I guess I'm making a kind of middleware or wrapper interface). I'm looking for some advice on structure and

Re: special editor support for indentation needed.

2008-11-16 Thread John Yeung
On Nov 15, 8:50 pm, "Eric S. Johansson" <[EMAIL PROTECTED]> wrote: > well, therein lies the rub.  I don't know lisp, > I don't know Emacs internals let alone python mode. Unfortunately, neither do I. Actually, I haven't touched Emacs since my college days, and barely remember any of it. I figure

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-16 Thread Chris Rebert
For the Nth time this year that this has come up, I'll point out yet again that this issue has already been discussed to death before: [Python-ideas] proto-PEP: Fixing Non-constant Default Arguments http://mail.python.org/pipermail/python-ideas/2007-January/000121.html [Python-3000] pre-PEP: Defa

Re: Win 98 with Python 2.5--matplotlib and Numpy problem

2008-11-16 Thread Tino Wildenhain
W. eWatson wrote: I'm trying to figure out why an application that both myself and a colleague use gives errors when he uses it under W98. I'm using XP. Py 2.5 is installed on each of our machines. His first problem came with ... Clearly things have gone astray. Is numpy somehow not compati

Re: PP3E error

2008-11-16 Thread Gabriel Genellina
En Mon, 17 Nov 2008 03:32:35 -0200, ryan payton <[EMAIL PROTECTED]> escribió: I still need help with a PP3E error I am getting in my 'PyEdit' program I have from Progamming Python 3rd Edition. I am working on a mac and the error is coming from: from PP3E.Gui.Tools.guimaker import * Please

Re: Customizing sequence types

2008-11-16 Thread Terry Reedy
Mr.SpOOn wrote: On Sun, Nov 16, 2008 at 7:15 PM, Arnaud Delobelle You should probably use the `bisect` module (http://docs.python.org/library/bisect.html) for searching and inserting into the list as it takes advantage of and ensures that the list keeps sorted. It also means that __contains__

Re: end child process when parent dies (on Unix)

2008-11-16 Thread Lawrence D'Oliveiro
Дамјан Георгиевски wrote: > I'm starting a Unix tool with subprocess.Popen() from a python script > and I want the child to be killed when the parent (my script) ends for > whatever reason *including* if it gets killed by SIGKILL. A Linux-specific solution is prctl(2). -- http://mail.python.org/m

Re: document/image viewer

2008-11-16 Thread Lawrence D'Oliveiro
belred wrote: > does anyone know of any document/image viewers? Okular. -- http://mail.python.org/mailman/listinfo/python-list

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-16 Thread Terry Reedy
[EMAIL PROTECTED] wrote: Or one could adopt what Terry Reedy called a 4-aspect view: an object is identity, class, value (or local-state or something) and intrinsic-value. What I specifically said is id, class, instance attributes, and private data. So objects have only one, some only the ot

PP3E error

2008-11-16 Thread ryan payton
I still need help with a PP3E error I am getting in my 'PyEdit' program I have from Progamming Python 3rd Edition. I am working on a mac and the error is coming from: from PP3E.Gui.Tools.guimaker import * -- http://mail.python.org/mailman/listinfo/python-list

Python and Its Libraries--Who's on First?

2008-11-16 Thread W. eWatson
Is there some repository that says something like for Python 2.5 it works with: Win OSes: W2K, XP, Vista numpy vers y, matplotlib vers x. scipy z, etc. -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15'

RE: [Py2exe-users] py2exe 0.6.9 released

2008-11-16 Thread Mark Hammond
> After I "compile" my program with py2exe 0.6.9 with Python 2.6, I'm > still getting the "Application Did Not Initialize Properly" error > dialog whenever I run my code. What am I doing wrong? This probably means the Microsoft VC90 binaries aren't installed globally on your machine - which would

Re: Single-instance daemons

2008-11-16 Thread Дамјан Георгиевски
> As per Stevens/Rago, "file and record locking provides a convenient > mutual-exclusion mechanism". On linux (at least) there's one nice trick to get a single-instance program. Create a unix domain socket, and bind it to an address that begins with the null character '\0'. You can bind the sa

Re: py2exe 0.6.9 released

2008-11-16 Thread Benjamin Kaplan
On Sun, Nov 16, 2008 at 2:21 AM, Jimmy Retzlaff <[EMAIL PROTECTED]> wrote: > py2exe 0.6.9 released > = > > py2exe is a Python distutils extension which converts Python scripts > into executable Windows programs, able to run without requiring a > Python installation. Console and

end child process when parent dies (on Unix)

2008-11-16 Thread Дамјан Георгиевски
Hi all, I'm starting a Unix tool with subprocess.Popen() from a python script and I want the child to be killed when the parent (my script) ends for whatever reason *including* if it gets killed by SIGKILL. For normal situations I can send a signal to the pid of the Popen object. But not if the

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-16 Thread rurpy
On Nov 16, 5:12 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> The Python Reference Manual states that an object >> consists of identity, type, and value. "Identity" >> seems to be non-controversial. >> >> Let's take "type" as meaning the attributes an >> object inherits from it's class. "value"

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-16 Thread Terry Reedy
Steven D'Aprano wrote: Because of Python's interpreted nature, names can't be compiled away as in C, they need a concrete runtime existence, but does the language definition need to assume that? Of course. It wouldn't be Python if they didn't. However, remember that objects don't have names.

Win 98 with Python 2.5--matplotlib and Numpy problem

2008-11-16 Thread W. eWatson
I'm trying to figure out why an application that both myself and a colleague use gives errors when he uses it under W98. I'm using XP. Py 2.5 is installed on each of our machines. His first problem came with matplotlib that pointed to the "from pylab ..." line below. The message ended with " .

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-16 Thread alex23
On Nov 17, 12:27 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > If multiple statements are needed to perform the > argument initialization, how would you then propose the problem should > be solved? Why, with another function of course! def f(x, y=`f_arg_computation(x)`): ... Or my personal favou

Re: python script to act as list server

2008-11-16 Thread Lawrence D'Oliveiro
William Gill wrote: > I want to forward any email addressed to [EMAIL PROTECTED] to a python > script that will forward it to all the other subscribers,but does not > reveal the sender's email address. Instead the return address will be > [EMAIL PROTECTED] That way people will be able to have an

Re: Need help in understanding a python code

2008-11-16 Thread alex23
On Nov 17, 11:40 am, Matt Nordhoff <[EMAIL PROTECTED]> wrote: > That study has been disputed; see the links at the top of > . Now, if there was any independent refutation of the original study that isn't based on Britannica's - not that I'm ou

Re: Good practice when writing modules...

2008-11-16 Thread Lawrence D'Oliveiro
Scott David Daniels wrote: > I would amend this advice by adding that you should (in such cases) put > a commented-out import at the top level (so you can look at the top of a > module's source and see what other modules it relies upon. That's what your editor's search function is for. -- http://

Re: Newbie code review of parsing program Please

2008-11-16 Thread Lawrence D'Oliveiro
len wrote: > if fieldline.count('COMP.') > 0: I take it you're only handling a particular subset of COBOL constructs: thus, "COMP" is never "COMPUTATIONAL" or "USAGE IS COMPUTATIONAL", and it always occurs just before the full-stop (can't remember enough COBOL syntax to be sure if anythin

Re: Is this optparse object abuse?

2008-11-16 Thread John O'Hagan
On Sun, 16 Nov 2008, Diez B. Roggisch wrote: > John O'Hagan wrote: > > On Sun, 16 Nov 2008, Diez B. Roggisch wrote: > >> > In other words, using the optparse object to hold as attributes > >> > everything needed by all the functions and methods in the module, and > >> > simply passing it holus bolu

Re: C Function Pointer Wrapping Example not working

2008-11-16 Thread Charlie
> > >  But when I try to import test in python, it complains: > >  import _test > >  ImportError: ./_test.so undefined symbol: _Z9binary_opiiPFiiiE > > The above is a mangled name so you've got some C vs C++ problems I'd > say. > > You could try putting some extern "C" {} in around all the functio

Re: Is this optparse object abuse?

2008-11-16 Thread John O'Hagan
On Sun, 16 Nov 2008, Bruno Desthuilliers wrote: > John O'Hagan a écrit : [...] > > > In other words, using the optparse object to hold as attributes > > everything needed by all the functions and methods in the module, and > > simply passing it holus bolus to all them and just pulling out what's >

Re: Generators and their next() and send() methods

2008-11-16 Thread Aaron Brady
On Nov 16, 3:36 pm, Thomas Mlynarczyk <[EMAIL PROTECTED]> wrote: > Arnaud Delobelle schrieb: > > > If you want to simply 'set' the generator (by which I take you mean > > 'change its state') without without iterating it one step, then what you > > need is a class with an __iter__() method.  Then yo

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-16 Thread Steve Holden
Aaron Brady wrote: > On Nov 16, 7:28 am, Steve Holden <[EMAIL PROTECTED]> wrote: >> George Sakkis wrote: >>> On Nov 16, 2:05 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: Steven D'Aprano <[EMAIL PROTECTED]> writes: > On Sat, 15 Nov 2008 01:40:04 -0800, Rick Giuly wrote: >> Hello All,

Re: [Py2exe-users] py2exe 0.6.9 released

2008-11-16 Thread Chris Spencer
After I "compile" my program with py2exe 0.6.9 with Python 2.6, I'm still getting the "Application Did Not Initialize Properly" error dialog whenever I run my code. What am I doing wrong? Note that py2exe 0.6.9 with Python 2.5 works just fine. Help! Chris. On Sat, 15 Nov 2008 23:21:15 -0800,

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-16 Thread Aaron Brady
On Nov 16, 12:52 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 15 Nov 2008 21:29:22 -0800, Aaron Brady wrote: ... > If you want to be pedantic, then my "answer" (which you seem to approve > of) doesn't correspond to either of the original poster's questions. If > you'r

document/image viewer

2008-11-16 Thread belred
does anyone know of any document/image viewers? i would like to create an app that can display (read-only) many types of documents such as .doc, .xls, .tiff, .pdf, etc. it would be great if i can do this using python. looks like i might be able to create something with PIL, but i'm coming up em

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-16 Thread Aaron Brady
On Nov 16, 7:28 am, Steve Holden <[EMAIL PROTECTED]> wrote: > George Sakkis wrote: > > On Nov 16, 2:05 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > >> Steven D'Aprano <[EMAIL PROTECTED]> writes: > >>> On Sat, 15 Nov 2008 01:40:04 -0800, Rick Giuly wrote: > Hello All, > Why is pytho

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-16 Thread Aaron Brady
On Nov 16, 4:05 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sun, 16 Nov 2008 07:05:51 +, Arnaud Delobelle wrote: > > Steven D'Aprano <[EMAIL PROTECTED]> writes: > > >> On Sat, 15 Nov 2008 01:40:04 -0800, Rick Giuly wrote: > > >>> Hello All, > > >>> Why is python desig

Very simple WSGI question

2008-11-16 Thread Matthew Wilson
I want to write some middleware to notice when the inner app returns a 500 status code. I'm sure there are already sophisticated loggers that do this sort of thing, but I'm using this as a learning exercise. Right now, I wrapped the start_response callable. So when the WSGI application calls the

Re: Need help in understanding a python code

2008-11-16 Thread Matt Nordhoff
Benjamin Kaplan wrote: > If you really believe that, you haven't been following this list long > enough. Every terminology dispute always includes at least 1 Wikipedia > link. > > Also, you might want to look at this study: > http://news.cnet.com/2100-1038_3-5997332.html That study has been dispu

Re: Need help in understanding a python code

2008-11-16 Thread Benjamin Kaplan
On Sun, Nov 16, 2008 at 7:34 AM, John Machin <[EMAIL PROTECTED]> wrote: > On Nov 16, 11:04 pm, Steven D'Aprano <[EMAIL PROTECTED] > cybersource.com.au> wrote: > > On Sun, 16 Nov 2008 02:41:03 -0800, John Machin wrote: > > > On Nov 16, 9:31 pm, Steven D'Aprano <[EMAIL PROTECTED] > > > cybersource.c

Re: Python IF THEN chain equivalence

2008-11-16 Thread Steve Holden
jzakiya wrote: > On Nov 13, 5:48 pm, "M.-A. Lemburg" <[EMAIL PROTECTED]> wrote: >> On 2008-11-13 23:31, jzakiya wrote: >> >> >> >>> On Nov 13, 5:21 pm, Alan Baljeu <[EMAIL PROTECTED]> wrote: I think you should rethink your post. The first case you posted makes no sense in any language I

Re: Need help in understanding a python code

2008-11-16 Thread alex23
On Nov 17, 5:26 am, George Sakkis <[EMAIL PROTECTED]> wrote: > When quoting wikipedia became the new Godwin's law ?? :) Probably at the point the editors started becoming revisionists and culling anything they didn't consider notable enough. -- http://mail.python.org/mailman/listinfo/python-list

Re: Generators and their next() and send() methods

2008-11-16 Thread alex23
On Nov 17, 7:36 am, Thomas Mlynarczyk <[EMAIL PROTECTED]> wrote: > Still, I would like to know why it was decided to > introduce a send() method instead of allowing an argument for next(). Hey Thomas, A great place to gain insight into the reasoning behind changes to Python is the PEPs: http://w

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-16 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Since many responses to my definition of > value raised similar points, I will try > and respond generally here. > > In hindsight, I should not have used the > word "value"; it is far too overloaded with > preexisting semantics for me to have attempted > to redefine it,

Re: re.match and non-alphanumeric characters

2008-11-16 Thread John Machin
On Nov 17, 10:19 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > John Machin schrieb: > > > On Nov 17, 4:44 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > >>  Match matches the whole string. > > > *ONLY* if the pattern ends with "$" or r"\Z" > > You think so? > > import re > > rex = re.c

Re: re.match and non-alphanumeric characters

2008-11-16 Thread Steve Holden
Diez B. Roggisch wrote: > John Machin schrieb: >> On Nov 17, 4:44 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> >>> Match matches the whole string. >> >> *ONLY* if the pattern ends with "$" or r"\Z" > > > You think so? > > import re > > rex = re.compile("abc.*def") > > if rex.match("ab

ANN: PySmell 0.7.2 released, many TextMate improvements

2008-11-16 Thread Orestis Markou
I'm very proud to announce the release of PySmell v0.7.2, now with extra goodness. Changes: * TextMate's dialog no longer errors when dealing with a huge number of entries. * New --input allows mutation of existing PYSMELLTAGS file; useful to run after a file is saved * Analyze the curr

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-16 Thread rurpy
Since many responses to my definition of value raised similar points, I will try and respond generally here. In hindsight, I should not have used the word "value"; it is far too overloaded with preexisting semantics for me to have attempted to redefine it, even if it is the word used (but not def

Re: Test if list contains another list

2008-11-16 Thread Ali
Its funny, I just visited this problem last week. ./Ali -- http://mail.python.org/mailman/listinfo/python-list

Re: re.match and non-alphanumeric characters

2008-11-16 Thread Diez B. Roggisch
John Machin schrieb: On Nov 17, 4:44 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: Match matches the whole string. *ONLY* if the pattern ends with "$" or r"\Z" You think so? import re rex = re.compile("abc.*def") if rex.match("abc0123455678def"): print "matched" Diez -- http

Re: Midi manipulation

2008-11-16 Thread Tim Roberts
Massi <[EMAIL PROTECTED]> wrote: > >Hi everyone, I'm searching for "something" which allows me to write >scripts which handle midi files. I'm totally a newbie in audio >manipulation, therefore any suggestion or link related to this field >is welcome. Thanks in advance. Google is much faster than t

Re: Midi manipulation

2008-11-16 Thread Alia Khouri
On Nov 16, 10:17 pm, Massi <[EMAIL PROTECTED]> wrote: > Hi everyone, I'm searching for "something" which allows me to write > scripts which handle midi files. I'm totally a newbie in audio > manipulation, therefore any suggestion or link related to this field > is welcome. Thanks in advance. http:

Re: Generators and their next() and send() methods

2008-11-16 Thread Thomas Mlynarczyk
Arnaud Delobelle schrieb: If you want to simply 'set' the generator (by which I take you mean 'change its state') without without iterating it one step, then what you need is a class with an __iter__() method. Then you can change the state of the object between calls to next(). E.g. class M

C extension - new and init functions

2008-11-16 Thread Paul Moore
I have a C extension type, "Pattern", where my type manages a dynamically allocated memory block (of "instructions", the details aren't important). The basic constructor builds a pattern with a single instruction ("End") as follows: static PyObject * Pattern_new(PyTypeObject *type, PyObject *args

Re: re.match and non-alphanumeric characters

2008-11-16 Thread John Machin
On Nov 17, 4:44 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Match matches the whole string. *ONLY* if the pattern ends with "$" or r"\Z" -- http://mail.python.org/mailman/listinfo/python-list

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-16 Thread George Sakkis
On Nov 16, 2:30 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote: > On Sun, Nov 16, 2008 at 11:02 AM, George Sakkis <[EMAIL PROTECTED]> wrote: > > On Nov 16, 8:28 am, Steve Holden <[EMAIL PROTECTED]> wrote: > > >> "Less obvious" is entirely in the mind of the reader. > > > Without documentation or peek

Re: Does python is suitable for enterprise cluster management?

2008-11-16 Thread Aahz
In article <[EMAIL PROTECTED]>, Asaf Hayman <[EMAIL PROTECTED]> wrote: > >Is anyone familiar or aware of a successful enterprise class project >in Python to control and monitor a cluster of computers? Ever heard of Google? ;-) -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythonc

Re: Does python is suitable for enterprise cluster management?

2008-11-16 Thread bearophileHUGS
Asaf Hayman: > We are currently pondering which programming language will best suite > us. The two major contenders are Python and Java. I think there is also Erlang for such kind of things. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: Clustering the keys of a dict according to its values

2008-11-16 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : Bruno Desthuilliers: What is data is another type of sequence or iterable ?-)< The original problem statement was: I did read it, thanks. If the problem changes, then the code has to/can change. When you write code it's better to avoid over-generalization It

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-16 Thread Chris Rebert
On Sun, Nov 16, 2008 at 11:02 AM, George Sakkis <[EMAIL PROTECTED]> wrote: > On Nov 16, 8:28 am, Steve Holden <[EMAIL PROTECTED]> wrote: >> >> > +1. Understanding and accepting the current behavior (mainly because >> > of the extra performance penalty of evaluating the default expressions >> > on e

Re: Is this optparse object abuse?

2008-11-16 Thread Bruno Desthuilliers
John O'Hagan a écrit : Hello, I've recently found it convenient to do something like this: (snip) In other words, using the optparse object to hold as attributes everything needed by all the functions and methods in the module, and simply passing it holus bolus to all them and just pulling o

Re: Need help in understanding a python code

2008-11-16 Thread George Sakkis
On Nov 16, 7:34 am, John Machin <[EMAIL PROTECTED]> wrote: > On Nov 16, 11:04 pm, Steven D'Aprano <[EMAIL PROTECTED] > > >http://en.wikipedia.org/wiki/Style_over_substance_fallacy > > Quoted Wikipedia -> instant disqualification -> you lose. Good night. When quoting wikipedia became the new Godwin

Re: Newbie code review of parsing program Please

2008-11-16 Thread Steve Holden
Mark Tolonen wrote: > > "len" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] [...] > > You might want to check out the pyparsing library. > And you might want to trim your messages to avoid quoting irrelevant stuff. This is not directed personally at Mark, but at all readers. Loa

Midi manipulation

2008-11-16 Thread Massi
Hi everyone, I'm searching for "something" which allows me to write scripts which handle midi files. I'm totally a newbie in audio manipulation, therefore any suggestion or link related to this field is welcome. Thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: Optional parameter object re-used when instantiating multiple objects

2008-11-16 Thread George Sakkis
On Nov 16, 8:28 am, Steve Holden <[EMAIL PROTECTED]> wrote: > > > +1. Understanding and accepting the current behavior (mainly because > > of the extra performance penalty of evaluating the default expressions > > on every call would incur) is one thing, claiming that it is somehow > > natural is p

Re: Newbie code review of parsing program Please

2008-11-16 Thread len
On Nov 16, 12:40 pm, "Mark Tolonen" <[EMAIL PROTECTED]> wrote: > "len" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > > > > >I have created the following program to read a text file which happens > > to be a cobol filed definition.  The program then outputs to a file > > what

Re: Newbie code review of parsing program Please

2008-11-16 Thread Mark Tolonen
"len" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] I have created the following program to read a text file which happens to be a cobol filed definition. The program then outputs to a file what is essentially a file which is a list definition which I can later copy and past into

Re: Customizing sequence types

2008-11-16 Thread Mr . SpOOn
On Sun, Nov 16, 2008 at 7:15 PM, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > Mr.SpOOn <[EMAIL PROTECTED]> writes: > >> Hi, >> I'm trying to create a class which inherit a list to change some behavior. >> This list should contain other instance objects and has to manage >> these instances in a par

Re: Does python is suitable for enterprise cluster management?

2008-11-16 Thread Steve Holden
Asaf Hayman wrote: > Is anyone familiar or aware of a successful enterprise class project > in Python to control and monitor a cluster of computers? > > As a part of a bigger project my company needs to build a cluster > management system. The aim of the system is to control and synchronize > appl

Re: Customizing sequence types

2008-11-16 Thread Arnaud Delobelle
Mr.SpOOn <[EMAIL PROTECTED]> writes: > Hi, > I'm trying to create a class which inherit a list to change some behavior. > This list should contain other instance objects and has to manage > these instances in a particular way. > > 1) I need to sort this elements in this list, but they must be sort

Re: Customizing sequence types

2008-11-16 Thread Chris Rebert
On Sun, Nov 16, 2008 at 8:16 AM, Mr. SpOOn <[EMAIL PROTECTED]> wrote: > Hi, > I'm trying to create a class which inherit a list to change some behavior. > This list should contain other instance objects and has to manage > these instances in a particular way. > > 1) I need to sort this elements in

Re: Customizing sequence types

2008-11-16 Thread Steve Holden
Mr.SpOOn wrote: > Hi, > I'm trying to create a class which inherit a list to change some behavior. > This list should contain other instance objects and has to manage > these instances in a particular way. > > 1) I need to sort this elements in this list, but they must be sorted > using an instanc

Re: about escape string store in mysql

2008-11-16 Thread Steve Holden
MRAB wrote: > On Nov 16, 7:05 am, [EMAIL PROTECTED] wrote: >> this string from web by the Regular Expression, >> −−− >> href="#" onClick="ConvertURL2FG('Flashget:// >> W0ZMQVNIR0VUXWh0dHA6Ly9tb3YuM2dwLmNuL2d1aWxpbi8yMDA4LzExLzExL3l1ZWhvdWppZmVuMDIuM2dwW0ZMQVN

Re: special editor support for indentation needed.

2008-11-16 Thread Aahz
In article <[EMAIL PROTECTED]>, Eric S. Johansson <[EMAIL PROTECTED]> wrote: > >here's an example of the problem: >class foo( object): >def cat(self) > self.x=1 > def dog >self.x=2 > >this is legal Python but it's not what you need 99% of the time. There is no >cue to t

Re: re.match and non-alphanumeric characters

2008-11-16 Thread Diez B. Roggisch
The Web President wrote: > Dear all, > > this is really driving me nuts and any help would be extremely > appreciated. > > I have a string that contains some numeric data. I want to isolate > these data using re.match, as follows. > > bogus = "IFC(35m)" > data = re.match(r'(\d+)',bogus) > print

Newbie code review of parsing program Please

2008-11-16 Thread len
I have created the following program to read a text file which happens to be a cobol filed definition. The program then outputs to a file what is essentially a file which is a list definition which I can later copy and past into a python program. I will eventually expand the program to also outpu

Re: Little direction please Python MySQL

2008-11-16 Thread len
On Nov 15, 4:41 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sat, 15 Nov 2008 11:41:17 -0800, Ethan Furman <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > > len wrote: >         > > > > Files are fixed format no field delimiters, fields are position and > > > le

Re: Good practice when writing modules...

2008-11-16 Thread Nick Craig-Wood
r0g <[EMAIL PROTECTED]> wrote: > I'm collecting together a bunch of fairly random useful functions I have > written over the years into a module. Generally speaking is it best to > > a) Import all the other modules these functions depend on into the > modules global namespace by putting them a

Re: python script to act as list server

2008-11-16 Thread Benjamin Kaplan
On Sun, Nov 16, 2008 at 12:05 PM, William Gill <[EMAIL PROTECTED]> wrote: > Before I spend the next couple weeks researching and testing, can anyone > tell me if what I want to do is possible, and possibly point me in the right > direction to get started. > > I want to forward any email addressed

python script to act as list server

2008-11-16 Thread William Gill
Before I spend the next couple weeks researching and testing, can anyone tell me if what I want to do is possible, and possibly point me in the right direction to get started. I want to forward any email addressed to [EMAIL PROTECTED] to a python script that will forward it to all the other su

Re: re.match and non-alphanumeric characters

2008-11-16 Thread Gabriel Genellina
En Sun, 16 Nov 2008 14:33:42 -0200, The Web President <[EMAIL PROTECTED]> escribió: I have a string that contains some numeric data. I want to isolate these data using re.match, as follows. bogus = "IFC(35m)" data = re.match(r'(\d+)',bogus) print data.group(1) I would expect to have "35" pri

Re: re.match and non-alphanumeric characters

2008-11-16 Thread MRAB
On Nov 16, 4:33 pm, The Web President <[EMAIL PROTECTED]> wrote: > Dear all, > > this is really driving me nuts and any help would be extremely > appreciated. > > I have a string that contains some numeric data. I want to isolate > these data using re.match, as follows. > > bogus = "IFC(35m)" > dat

Re: re.match and non-alphanumeric characters

2008-11-16 Thread r
On Nov 16, 10:33 am, The Web President <[EMAIL PROTECTED]> wrote: > Dear all, > > this is really driving me nuts and any help would be extremely > appreciated. > > I have a string that contains some numeric data. I want to isolate > these data using re.match, as follows. > > bogus = "IFC(35m)" > da

Re: Building musical chords starting from (a lot of) rules

2008-11-16 Thread bvdp
Mr.SpOOn wrote: So for example in jazz music it is more common the minor seventh than the major, so writing just G7 you mean the dominant seventh chord (with minor seventh) and you have to write just the major one with maj7. A minor 7th has a flatted 3rd (ie. C, Eb, G, Bb). Don't confuse your

Does python is suitable for enterprise cluster management?

2008-11-16 Thread Asaf Hayman
Is anyone familiar or aware of a successful enterprise class project in Python to control and monitor a cluster of computers? As a part of a bigger project my company needs to build a cluster management system. The aim of the system is to control and synchronize applications. Namely, a central man

Re: Is this optparse object abuse?

2008-11-16 Thread Diez B. Roggisch
John O'Hagan wrote: > On Sun, 16 Nov 2008, Diez B. Roggisch wrote: >> > In other words, using the optparse object to hold as attributes >> > everything needed by all the functions and methods in the module, and >> > simply passing it holus bolus to all them and just pulling out what's >> > actuall

re.match and non-alphanumeric characters

2008-11-16 Thread The Web President
Dear all, this is really driving me nuts and any help would be extremely appreciated. I have a string that contains some numeric data. I want to isolate these data using re.match, as follows. bogus = "IFC(35m)" data = re.match(r'(\d+)',bogus) print data.group(1) I would expect to have "35" prin

Have you ever used pydiction?

2008-11-16 Thread 一首诗
Hi all, Recently I am writing more codes in python with vim so I made some search for python auto completion plugins. Finally I found pydcition: http://www.vim.org/scripts/script.php?script_id=850 Anyway, it works. But I met one problem. After you have set isk+=.,( The dot "." becomes p

Re: Win 98 --Is 2.4.x The last version of Python for It?

2008-11-16 Thread Gabriel Genellina
En Sun, 16 Nov 2008 13:46:03 -0200, W. eWatson <[EMAIL PROTECTED]> escribió: Win 98 --Is 2.4.x The last version of Python for It? No, 2.5 still works on W98, 2.6 doesn't. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Re: C Function Pointer Wrapping Example not working

2008-11-16 Thread Nick Craig-Wood
Charlie <[EMAIL PROTECTED]> wrote: > I am new to using swig/C++/python. I got some problem with function > pointers. I posted in swig-user, but got no response. So I forwarded > it here. You help is greatly appreciated. > > Thanks! > > > Hi All, > > Yesterday I posted about the question I

Re: Win 98 --Is 2.4.x The last version of Python for It?

2008-11-16 Thread Christian Heimes
Python 2.5 is the last version for Win9x and NT. Starting with Python 2.6 and 3.0 at least Windows 2000 SP4 is required. Christian -- http://mail.python.org/mailman/listinfo/python-list

Customizing sequence types

2008-11-16 Thread Mr . SpOOn
Hi, I'm trying to create a class which inherit a list to change some behavior. This list should contain other instance objects and has to manage these instances in a particular way. 1) I need to sort this elements in this list, but they must be sorted using an instance variable. What does Python u

Re: Is this optparse object abuse?

2008-11-16 Thread John O'Hagan
On Sun, 16 Nov 2008, Diez B. Roggisch wrote: > > In other words, using the optparse object to hold as attributes > > everything needed by all the functions and methods in the module, and > > simply passing it holus bolus to all them and just pulling out what's > > actually needed inside the functio

Re: Win 98 --Is 2.4.x The last version of Python for It?

2008-11-16 Thread Benjamin Kaplan
For x86 processors: python-2.5.2.msi For Win64-Itanium users: python-2.5.2.ia64.msi For Win64-AMD64 users: python-2.5.2.amd64.msi

Win 98 --Is 2.4.x The last version of Python for It?

2008-11-16 Thread W. eWatson
-- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet Web Page: -- http://mail.python.org/mailman/listinfo/python-list

Re: Little direction please Python MySQL

2008-11-16 Thread Tino Wildenhain
Bruno Desthuilliers wrote: len a écrit : Hi all; I am looking for a little direction in moving from novice python MySQL to real world processing. I can connect to MySQL databases and have performed most of the various select, create, update, insert, etc given the examples in the various books

Re:

2008-11-16 Thread Benjamin Kaplan
On Wed, Nov 12, 2008 at 4:02 AM, anish mathew <[EMAIL PROTECTED]>wrote: > pls help me > > html page conecting to database sql or .mdb files > > pls sent qury > I know that English may not be your first language, but please make an effort to use proper English. Your question isn't really

Re: about escape string store in mysql

2008-11-16 Thread MRAB
On Nov 16, 7:05 am, [EMAIL PROTECTED] wrote: > this string from web by the Regular Expression, > −−− > href="#" onClick="ConvertURL2FG('Flashget:// > W0ZMQVNIR0VUXWh0dHA6Ly9tb3YuM2dwLmNuL2d1aWxpbi8yMDA4LzExLzExL3l1ZWhvdWppZmVuMDIuM2dwW0ZMQVNIR0VUXQ==&233','',

[no subject]

2008-11-16 Thread anish mathew
pls help me        html page conecting to database sql or .mdb files     pls sent qury Check out the all-new face of Yahoo! India. Go to http://in.yahoo.com/-- http://mail.python.org/mailman/listinfo/python-list

  1   2   >