Re: list index()

2007-09-04 Thread Steve Holden
TheFlyingDutchman wrote: >> I explain it by noting that list.index and dict.get serve totally >> different purposes. The former returns the index given a value; the >> latter returns a value given a key. > > And the former raises an exception if the value is not found, while > the latter returns N

Re: list index()

2007-09-04 Thread TheFlyingDutchman
> > I explain it by noting that list.index and dict.get serve totally > different purposes. The former returns the index given a value; the > latter returns a value given a key. And the former raises an exception if the value is not found, while the latter returns None if the value is not found.

Re: doctest and decorators

2007-09-04 Thread Michele Simionato
> En Tue, 04 Sep 2007 19:29:11 -0300, Daniel Larsson > <[EMAIL PROTECTED]> escribi?: > > > > > On 9/5/07, Ferenczi Viktor <[EMAIL PROTECTED]> wrote: > > >> > > @functools.wraps(f) > >> > > Pass the function to be wrapped by the decorator to the wraps > >> function. > >> > Ooops, right. That doesn't

Re: Sort of an odd way to debug...

2007-09-04 Thread Alex Martelli
xkenneth <[EMAIL PROTECTED]> wrote: ... > What I'd like to do, is define a base class. This base class would > have a function, that gets called every time another function is > called (regardless of whether in the base class or a derived class), > and prints the doc string of each function when

How do i record and invert a sound wave in real time using Tkinter, tkSnack and wave modules?

2007-09-04 Thread Karthik
Hi, I want to record a sound wave from a mic and at the same time invert it and play the inverted wave.My code goes as follows, however nothing is written into the E:\inverted.wav file.Thanks in advance for any help. from Tkinter import * root = Tk() import tkSnack tkSnack.initializeSnack(root) t=

Re: REGULAR EXPRESSION

2007-09-04 Thread AniNair
On Sep 5, 4:35 am, Ricardo Aráoz <[EMAIL PROTECTED]> wrote: > Steve Holden wrote: > > AniNair wrote: > >> hi.. I am trying to match '+ %&/-' etc using regular expression in > >> expressions like 879+34343. I tried \W+ but it matches only in the > >> beginning of the string Plz help Thanking you

Re: Does shuffle() produce uniform result ?

2007-09-04 Thread Paul Rubin
Steven D'Aprano <[EMAIL PROTECTED]> writes: > > Right. The idea is that those attacks don't exist and therefore the > > output is computationally indistinguishable from random. > > It is a huge leap from what the man page says, that they don't exist in > the unclassified literature at the time t

Re: list index()

2007-09-04 Thread Alex Martelli
Neil Cerutti <[EMAIL PROTECTED]> wrote: > It's probable that a simpler implementation using slice > operations will be faster for shortish lengths of subseq. It was > certainly easier to get it working correctly. ;) > > def find(seq, subseq): > for i, j in itertools.izip(xrange(len(seq)-len(sub

Re: list index()

2007-09-04 Thread Ben Finney
Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes: > In message <[EMAIL PROTECTED]>, > Jason wrote: > > > The reason why the exception is more Pythonic is that the return > > value is always a guaranteed good index into the list. > > How do you explain dict.get, then? I explain it by noting that l

Re: Undeterministic strxfrm?

2007-09-04 Thread Gabriel Genellina
En Tue, 04 Sep 2007 22:18:05 -0300, Tuomas <[EMAIL PROTECTED]> escribi�: > Peter Otten wrote: >> Python seems to be the culprit as there is a relatively recent >> strxfrm-related bugfix, see > > Thanks Peter. Can't find it, do you have the issue number? I think it's not in the issue tracker - s

Re: list index()

2007-09-04 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Jason wrote: > The reason why the exception is more Pythonic is that the return value > is always a guaranteed good index into the list. How do you explain dict.get, then? -- http://mail.python.org/mailman/listinfo/python-list

Re: Questions on FOX GUI and Python

2007-09-04 Thread llothar
On 5 Sep., 02:15, Kenneth McDonald <[EMAIL PROTECTED]> wrote: > Would anyone care to offer their opinions as to using Python with the > FOX GUI toolkit? Ease of use, stability, power, > speed, etc., all thoughts would be appreciated. Pure theoretical question, as FXPy is not supported anymore, bu

Re: parameter list notation

2007-09-04 Thread TheFlyingDutchman
> > Perhaps you could move further discussions to comp.lang.piethun? > Fair enough. Will contain PIEthun discussion to the PIEthun mailing list and the aforementioned newsgroup once it is established. It suddenly dawned on me while rereading my defense of my use of the term "array" that I w

Re: Parse or Pass?

2007-09-04 Thread Martin P. Hellwig
Martin v. Löwis wrote: > If I extrapolate my experience with German IT language, I > think people often use terminology they have not fully > understood. I often ask my students what the difference > between "eingeben", "ausgeben", "übergeben" und > "zurückgeben" is when they start saying that "di

Re: Does shuffle() produce uniform result ?

2007-09-04 Thread Raymond Hettinger
On Aug 24, 12:38 am, tooru honda <[EMAIL PROTECTED]> wrote: > 1. Does shuffle() produce uniform result ? If you're worried about this microscopic bias (on the order of 2**-53), then shuffle more than once. That will distribute the bias more evenly: def super_shuffle(sequence): for i in r

Re: Undeterministic strxfrm?

2007-09-04 Thread Tuomas
Peter Otten wrote: > Python seems to be the culprit as there is a relatively recent > strxfrm-related bugfix, see Thanks Peter. Can't find it, do you have the issue number? > http://svn.python.org/view/python/trunk/Modules/_localemodule.c?rev=54669 > > If I understand it correctly the error make

RE: Setting Current Dir in Python

2007-09-04 Thread Sandipan News
Tim and Gabriel, Thank you so much. I was able to find and remove the special character from the line below and another one after it. The error has now gone away. Thanks also for the chdir solution, though I did not need it this time. The fix above was exactly what it needed to work. I have my

Re: doctest and decorators

2007-09-04 Thread Daniel Larsson
On 9/5/07, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > > En Tue, 04 Sep 2007 19:29:11 -0300, Daniel Larsson > <[EMAIL PROTECTED]> escribi�: > > > On 9/5/07, Ferenczi Viktor <[EMAIL PROTECTED]> wrote: > >> > >> > > @functools.wraps(f) > >> > > Pass the function to be wrapped by the decorator to t

Re: doctest and decorators

2007-09-04 Thread Gabriel Genellina
En Tue, 04 Sep 2007 19:29:11 -0300, Daniel Larsson <[EMAIL PROTECTED]> escribi�: > On 9/5/07, Ferenczi Viktor <[EMAIL PROTECTED]> wrote: >> >> > > @functools.wraps(f) >> > > Pass the function to be wrapped by the decorator to the wraps >> function. >> > Ooops, right. That doesn't change the fact

Re: REGULAR EXPRESSION

2007-09-04 Thread Ricardo Aráoz
Steve Holden wrote: > AniNair wrote: >> hi.. I am trying to match '+ %&/-' etc using regular expression in >> expressions like 879+34343. I tried \W+ but it matches only in the >> beginning of the string Plz help Thanking you in advance... >> > Perhaps you could give a few example of strings tha

Re: Creating a multi-tier client/server application

2007-09-04 Thread Kathryn Van Stone
Greetings, I somehow missed some of this thread, but I believe you left a note saying that you were not able to do Extreme Programming. However, based on the description of the size of the project and the size of the development team (is there any more than you?) I would recommend you consi

Re: parameter list notation

2007-09-04 Thread Steve Holden
TheFlyingDutchman wrote: > On Sep 4, 1:53 pm, Steven D'Aprano <[EMAIL PROTECTED] > cybersource.com.au> wrote: >> On Mon, 03 Sep 2007 22:10:41 -0700, TheFlyingDutchman wrote: >>> Well I did a search on "Python variable length arguments" and found a >>> hit that seems to explain the *fields parameter

Re: how can I find out the process ids with a process name

2007-09-04 Thread Karthik Gurusamy
On Sep 2, 12:26 pm, herman <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to find out all the process id with the process name > 'emacs'. > > In the shell, i can do this: > > $ ps -ef |grep emacs > root 20731 8690 0 12:37 pts/200:00:09 emacs-snapshot-gtk > root 25649 25357 0 13:55 pt

Dealing with PayPal's messy SPF records

2007-09-04 Thread Paul McNett
I administer email for a few clients of mine, using Postfix. One of the policies that is in place is SPF-checking, and rejecting messages accordingly. This has been working well for months. However, today a user called me to complain that they weren't able to get confirmed with PayPal to set up

Re: Python is overtaking Perl

2007-09-04 Thread Zentrader
>So, all the decline means is that the number of searches > for "Python programming" releative to all searches done is declining. Which makes sense. There are an many python tutorial/code snippet sites, sites that list those type of python sites, as well as the python.org site which means that a

Re: doctest and decorators

2007-09-04 Thread Daniel Larsson
On 9/5/07, Ferenczi Viktor <[EMAIL PROTECTED]> wrote: > > > > @functools.wraps(f) > > > Pass the function to be wrapped by the decorator to the wraps > function. > > Ooops, right. That doesn't change the fact that decorated functions get > > hidden from doctest though. I have no issue when the de

Re: Registering a python function in C

2007-09-04 Thread Matt McCredie
> > Is Maya a different python build than what is contained at python.org? > > If so, I suggest you get your C program to work with the latest python > > build > > from python.org. Then see if you can get it to work with the Maya > > version. > > Ok, did that. If I write a normal C++ program and u

Re: function call

2007-09-04 Thread ianaré
> > Every reasonable use case for this (and several unreasonable ones) > > that I've encountered (and some that I've just imagined) can be better > > addressed with a trace function (sys.set_trace) than by trying to do > > this at the point of call. > > Indeed. Thanks for the correction. > > > rel

Re: doctest and decorators

2007-09-04 Thread Ferenczi Viktor
> > @functools.wraps(f) > > Pass the function to be wrapped by the decorator to the wraps function. > Ooops, right. That doesn't change the fact that decorated functions get > hidden from doctest though. Run my test script (one file) with the -v (verbose) option. Without the -v option it does not

Re: parameter list notation

2007-09-04 Thread TheFlyingDutchman
On Sep 4, 1:53 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Mon, 03 Sep 2007 22:10:41 -0700, TheFlyingDutchman wrote: > > Well I did a search on "Python variable length arguments" and found a > > hit that seems to explain the *fields parameter: > > > When you declare an ar

Re: doctest and decorators

2007-09-04 Thread Daniel Larsson
On 9/4/07, Ferenczi Viktor <[EMAIL PROTECTED]> wrote: > > > @functools.wraps > > Correctly: > > @functools.wraps(f) > > Pass the function to be wrapped by the decorator to the wraps function. Ooops, right. That doesn't change the fact that decorated functions get hidden from doctest though. -- h

Re: FCGI app reloading on every request

2007-09-04 Thread Martin v. Löwis
>Anything executable in the > cgi-bin directory is being launched as a CGI program. A file > named "example.foo", if executable, will launch as a CGI program. > Nothing launches with FCGI. Perhaps you have a SetHandler declaration somewhere that makes all files CGI by default? I would advise

Re: Looking for Delaunay triangulation module...

2007-09-04 Thread Grant Edwards
On 2007-09-03, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-09-02, Robert Kern <[EMAIL PROTECTED]> wrote: > >>> Can anybody point me to a Delaunay triangulation module (for >>> Win32)? I'm currently using >>> http://flub.stuffwillmade.org/delny/ under Linux, but I have >>> been unable to fin

Re: function call

2007-09-04 Thread Steven D'Aprano
On Tue, 04 Sep 2007 13:17:39 -0700, ianaré wrote: > Hey all, > > Is there a way of printing out how a function was called? In other words > if I do the following: > > def someFunction(self): > self.someOtherFunction(var1, var2) > > > I would get something like "someOtherFunction: called by

Re: doctest and decorators

2007-09-04 Thread Ferenczi Viktor
> @functools.wraps Correctly: @functools.wraps(f) Pass the function to be wrapped by the decorator to the wraps function. Regards, Viktor -- http://mail.python.org/mailman/listinfo/python-list

Re: Does shuffle() produce uniform result ?

2007-09-04 Thread Steven D'Aprano
On Mon, 03 Sep 2007 23:42:56 -0700, Paul Rubin wrote: > Antoon Pardon <[EMAIL PROTECTED]> writes: >> > No the idea is that once there's enough entropy in the pool to make >> > one encryption key (say 128 bits), the output of /dev/urandom is >> > computationally indistinguishable from random output

Re: Undeterministic strxfrm?

2007-09-04 Thread Peter Otten
Am Tue, 04 Sep 2007 19:54:57 + schrieb Tuomas: > I get the same unstability with my locale 'fi_FI.utf8' too, so I am > wondering if the source of the problem is the clib or the Python wrapper > around it. Differences in strxfrm results for identical source are > allways in the few latest by

Re: function call

2007-09-04 Thread Bruno Desthuilliers
Chris Mellon a écrit : > On 9/3/07, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > >>ianaré a écrit : >> >>>Hey all, >>> >>>Is there a way of printing out how a function was called? In other >>>words if I do the following: >>> >>>def someFunction(self): >>>self.someOtherFunction(var1, var2)

Re: doctest and decorators

2007-09-04 Thread Daniel Larsson
On 9/4/07, Ferenczi Viktor <[EMAIL PROTECTED]> wrote: > > > I assume this is a FAQ, but I couldn't find much helpful information > > googling. I'm having trouble with doctest skipping my functions, if I'm > > using decorators (that are defined in a separate module). If I'm > > understanding what is

Re: function call

2007-09-04 Thread Chris Mellon
On 9/3/07, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > ianaré a écrit : > > Hey all, > > > > Is there a way of printing out how a function was called? In other > > words if I do the following: > > > > def someFunction(self): > > self.someOtherFunction(var1, var2) > > > > > > I would get so

Re: parameter list notation

2007-09-04 Thread Steven D'Aprano
On Mon, 03 Sep 2007 22:10:41 -0700, TheFlyingDutchman wrote: > Well I did a search on "Python variable length arguments" and found a > hit that seems to explain the *fields parameter: > > When you declare an argment to start with '*', it takes the argument > list into an array. No it doesn't.

Re: function call

2007-09-04 Thread Bruno Desthuilliers
Bruno Desthuilliers a écrit : > ianaré a écrit : > >> Hey all, >> >> Is there a way of printing out how a function was called? In other >> words if I do the following: >> >> def someFunction(self): >> self.someOtherFunction(var1, var2) >> >> >> I would get something like "someOtherFunction: ca

Re: pyPortMidi

2007-09-04 Thread daz.diamond
Cappy2112 wrote: > Does anyone here use pyPortMidi- in particular for Sending/receiving > sysex? > I'm starting to, but then I lurk more than I know ... daz -- http://mail.python.org/mailman/listinfo/python-list

Re: Undeterministic strxfrm?

2007-09-04 Thread Chris Mellon
On 9/4/07, Tuomas <[EMAIL PROTECTED]> wrote: > Gabriel Genellina wrote: > > En Tue, 04 Sep 2007 07:34:54 -0300, Tuomas > > <[EMAIL PROTECTED]> escribi�: > > > >> Python 2.4.3 (#3, Jun 4 2006, 09:19:30) > >> [GCC 4.0.0 20050519 (Red Hat 4.0.0-8)] on linux2 > >> Type "help", "copyright", "credits"

Re: function call

2007-09-04 Thread kyosohma
On Sep 4, 3:17 pm, ianaré <[EMAIL PROTECTED]> wrote: > Hey all, > > Is there a way of printing out how a function was called? In other > words if I do the following: > > def someFunction(self): > self.someOtherFunction(var1, var2) > > I would get something like "someOtherFunction: called by: >

Re: doctest and decorators

2007-09-04 Thread Ferenczi Viktor
> I assume this is a FAQ, but I couldn't find much helpful information > googling. I'm having trouble with doctest skipping my functions, if I'm > using decorators (that are defined in a separate module). If I'm > understanding what is happening correctly, it's because doctest checks if > the funct

Re: function call

2007-09-04 Thread Bruno Desthuilliers
ianaré a écrit : > Hey all, > > Is there a way of printing out how a function was called? In other > words if I do the following: > > def someFunction(self): > self.someOtherFunction(var1, var2) > > > I would get something like "someOtherFunction: called by: > someFunction, args are: var1,

doctest and decorators

2007-09-04 Thread Daniel Larsson
Hi, I assume this is a FAQ, but I couldn't find much helpful information googling. I'm having trouble with doctest skipping my functions, if I'm using decorators (that are defined in a separate module). If I'm understanding what is happening correctly, it's because doctest checks if the function's

function call

2007-09-04 Thread ianaré
Hey all, Is there a way of printing out how a function was called? In other words if I do the following: def someFunction(self): self.someOtherFunction(var1, var2) I would get something like "someOtherFunction: called by: someFunction, args are: var1, var2" Thanks in advance - ianaré --

Py3K: Ensuring future compatibility between function annotation based tools

2007-09-04 Thread Ferenczi Viktor
There could be future compatibility issues between libraries using the new function annotation scheme: PEP 3107 -- Function Annotations See also: http://www.python.org/dev/peps/pep-3107/ Let's assume two hypotetic libraries: mashaller: provides JSON marshalling support typechecker: provides runti

Re: Printing lists in columns

2007-09-04 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > On Sep 4, 3:20 pm, Bruno Desthuilliers [EMAIL PROTECTED]> wrote: > >>[EMAIL PROTECTED] a écrit : >>(snip) >> >> >>>Thanks guys >> >>>I have a list of lists such as >>> a = ["1" , "2"] b = ["4", "5", "6"] c = ["7",8", "9"] >>>Stored in another list: d = [a,b,c] >> >

Re: Undeterministic strxfrm?

2007-09-04 Thread Tuomas
Gabriel Genellina wrote: > En Tue, 04 Sep 2007 07:34:54 -0300, Tuomas > <[EMAIL PROTECTED]> escribi�: > >> Python 2.4.3 (#3, Jun 4 2006, 09:19:30) >> [GCC 4.0.0 20050519 (Red Hat 4.0.0-8)] on linux2 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> import locale

Re: REGULAR EXPRESSION

2007-09-04 Thread Jonathan Gardner
On Sep 4, 6:32 am, AniNair <[EMAIL PROTECTED]> wrote: > hi.. I am trying to match '+ %&/-' etc using regular expression in > expressions like 879+34343. I tried \W+ but it matches only in the > beginning of the string Plz help Thanking you in advance... You may want to read the page describing

Re: Setting Current Dir in Python

2007-09-04 Thread Gabriel Genellina
En Tue, 04 Sep 2007 09:12:22 -0300, Sandipan Gangopadhyay <[EMAIL PROTECTED]> escribi�: > I have recently installed Python 2.5.1 and Pythonwin (without any > errors) on > Windows Vista Ultimate. > > Now, the programs run fine within Pythonwin IDE when current directory is > set to the program'

Re: Sort of an odd way to debug...

2007-09-04 Thread Chris Mellon
On 9/4/07, xkenneth <[EMAIL PROTECTED]> wrote: > All, > > Sorry for the vague topic, but I really didn't know how to > describe what I want to do. I'd like to almost do a traceback of my > code for debugging and I thought this would be a really cool way to do > it if possible. > > What I'd like

Questions on FOX GUI and Python

2007-09-04 Thread Kenneth McDonald
Would anyone care to offer their opinions as to using Python with the FOX GUI toolkit? Ease of use, stability, power, speed, etc., all thoughts would be appreciated. Thanks, Ken -- http://mail.python.org/mailman/listinfo/python-list

Sort of an odd way to debug...

2007-09-04 Thread xkenneth
All, Sorry for the vague topic, but I really didn't know how to describe what I want to do. I'd like to almost do a traceback of my code for debugging and I thought this would be a really cool way to do it if possible. What I'd like to do, is define a base class. This base class would have a

Re: GC performance with lists

2007-09-04 Thread Zentrader
On Sep 4, 9:27 am, "John Krukoff" <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:python- > > [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] > > Sent: Tuesday, September 04, 2007 8:07 AM > > To: [EMAIL PROTECTED] > > Subject: GC performance with lists

Re: gucci shoes,LV handbag chanel levi's kobe max

2007-09-04 Thread Zentrader
Reported as spam -- http://mail.python.org/mailman/listinfo/python-list

Re: Undeterministic strxfrm?

2007-09-04 Thread Gabriel Genellina
En Tue, 04 Sep 2007 07:34:54 -0300, Tuomas <[EMAIL PROTECTED]> escribi�: > Python 2.4.3 (#3, Jun 4 2006, 09:19:30) > [GCC 4.0.0 20050519 (Red Hat 4.0.0-8)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import locale > >>> def key(s): > ... locale

Re: Noob: What is a slot? Me trying to understand another's code

2007-09-04 Thread Wildemar Wildenburger
Carnell, James E wrote: > > I am thinking about purchasing a book, but wanted to make sure I could > get through the code that implements what the book is about (Artificial > Intelligence a Modern Approach). Anyway, I'm not a very good programmer > and OOP is still sinking in, so please don't answ

Re: Noob: What is a slot? Me trying to understand another's code

2007-09-04 Thread Gabriel Genellina
En Tue, 04 Sep 2007 15:03:16 -0300, Carnell, James E <[EMAIL PROTECTED]> escribi�: > MY QUESTION: > What is a slot? In class Object below the __init__ has a slot. Note: > The slot makes use of a data object called 'percept' that is used in the > TableDrivenAgent(Agent) at the bottom of this pos

Re: FCGI app reloading on every request

2007-09-04 Thread John Nagle
Thorsten Kampe wrote: > * John Nagle (Mon, 03 Sep 2007 21:26:01 -0700) > >>I'm converting a web app from CGI to FCGI. The application works fine >>under FCGI, but it's being reloaded for every request, which makes FCGI >>kind of pointless. I wrote a little FCGI app which prints when the prog

Re: Rendering API for python?

2007-09-04 Thread Robert Dailey
Well, I guess I wrote too soon. I found this: http://matplotlib.sourceforge.net/ I'm going to try it out and see if it is what I'm looking for, however I'm pretty confident! On 9/4/07, Robert Dailey <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm developing a quick python script to test an algorithm o

Re: [Tutor] Code reading for learning Python

2007-09-04 Thread Shawn Milochik
I second the Python Cookbook recommendation. -- http://mail.python.org/mailman/listinfo/python-list

Rendering API for python?

2007-09-04 Thread Robert Dailey
Hi, I'm developing a quick python script to test an algorithm of mine. I would like to be able to plot the algorithm results to a diagram (much like you can do in Matlab). I was wondering if there's an API around that would allow me to quickly do this? Perhaps some sort of rendering API or plottin

Re: Printing lists in columns

2007-09-04 Thread Miles
On 9/4/07, Hrvoje Niksic wrote: > Python isn't too happy about adding individual keyword arguments after > an explicit argument tuple. Try this instead: > > for row in izip_longest(*d, **dict(fillvalue='*')): > print ', '.join(row) Or simply: for row in izip_longest(fillvalue='*', *d):

Noob: What is a slot? Me trying to understand another's code

2007-09-04 Thread Carnell, James E
I am thinking about purchasing a book, but wanted to make sure I could get through the code that implements what the book is about (Artificial Intelligence a Modern Approach). Anyway, I'm not a very good programmer and OOP is still sinking in, so please don't answer my questions like I really kno

Re: Python is overtaking Perl

2007-09-04 Thread OKB (not okblacke)
George Sakkis wrote: > On Sep 4, 8:35 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: >> On Tue, 04 Sep 2007 00:32:23 -, Ben <[EMAIL PROTECTED]> >> wrote: >> >Here are the statistics from Google Trends: >> >> >http://benyang22a.blogspot.com/2007/09/perl-vs-python.html >> >> >From the graph

Re: Parse or Pass?

2007-09-04 Thread Martin v. Löwis
> In general, "parsing" is analyzing the grammatical structure of a > string. People sometimes talk loosely about "parsing the command line". > but I don't think that's normally applied to providing the actual > arguments (corresponding to the definition's "formal parameters") when a > function is

Re: Printing lists in columns

2007-09-04 Thread Hrvoje Niksic
[EMAIL PROTECTED] writes: >> for row in izip_longest(*d, fillvalue='*'): >> print ', '.join(row) >> >> HTH > > I thought that but when I tried it I recieved a > "Syntax Error: Invalid Syntax" > with a ^ pointing to fillvalue :S Python isn't too happy about adding individual keyword arguments

Re: Python is overtaking Perl

2007-09-04 Thread Matimus
> So I think we can at least say from the chart that searches combining > the terms 'python' and 'programming' have been falling, by some > unquantifiable amount (it don't _look_ like much!?), relative to the > number of total searches. I think it is the search volume relative to the total number

Re: Python is overtaking Perl

2007-09-04 Thread George Sakkis
On Sep 4, 8:35 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On Tue, 04 Sep 2007 00:32:23 -, Ben <[EMAIL PROTECTED]> wrote: > >Here are the statistics from Google Trends: > > >http://benyang22a.blogspot.com/2007/09/perl-vs-python.html > > >From the graph, it seems more accurate to say th

Re: How do I get triangles from a vtkPolyData object?

2007-09-04 Thread Grant Edwards
On 2007-09-04, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2007-09-03, Grant Edwards <[EMAIL PROTECTED]> wrote: > > Is there _any_ documentation for the Python bindings to the vtk > library? I'm still beating my head against a wall trying to > figure out how to get the actual data out of vtk ob

RE: GC performance with lists

2007-09-04 Thread John Krukoff
> -Original Message- > From: [EMAIL PROTECTED] [mailto:python- > [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] > Sent: Tuesday, September 04, 2007 8:07 AM > To: python-list@python.org > Subject: GC performance with lists > > While working on some python wrapping, I've run into some prob

Re: parameter list notation

2007-09-04 Thread Steven D'Aprano
On Mon, 03 Sep 2007 22:00:28 -0700, TheFlyingDutchman wrote: > I am trying to use a database written in Python called buzhug. > > In looking at some of the functions I see this prototype: > > def create(self,*fields,**kw): > > I am not clear on what the * and the ** are for or what they rep

Re: Tkinter(2)

2007-09-04 Thread Zentrader
On Sep 4, 6:42 am, vijayca <[EMAIL PROTECTED]> wrote: > my python installation is:Active python 2.5.1 > i am using Red Hat Linux > i have the Tkinter module installed but any simple script produces an > error > > script: > from Tkinter import Label > widget = Label(None, text='Hello GUI world!'

Re: How do I get triangles from a vtkPolyData object?

2007-09-04 Thread Grant Edwards
On 2007-09-03, Grant Edwards <[EMAIL PROTECTED]> wrote: Is there _any_ documentation for the Python bindings to the vtk library? I'm still beating my head against a wall trying to figure out how to get the actual data out of vtk objects when Python doesn't make visible the required "Get" methods

Re: REGULAR EXPRESSION

2007-09-04 Thread Tuomas
AniNair wrote: > hi.. I am trying to match '+ %&/-' etc using regular expression in > expressions like 879+34343. I tried \W+ but it matches only in the > beginning of the string Plz help Thanking you in advance... > Is this what you are seeking for? >>> re.compile('(\+{0,1})?([0-9]+)').find

Re: GC performance with lists

2007-09-04 Thread Zentrader
On Sep 4, 7:06 am, [EMAIL PROTECTED] wrote: One thing to do is to calc i+1 etc before the j loop instead of on every iteration. That is, calculate 600,000 times instead of 6*57*100,000=34,200,00, And in today's world, it probably won't make a lot of difference, This is not related to gc but is a

Re: FCGI app reloading on every request

2007-09-04 Thread Thorsten Kampe
* John Nagle (Mon, 03 Sep 2007 21:26:01 -0700) > I'm converting a web app from CGI to FCGI. The application works fine > under FCGI, but it's being reloaded for every request, which makes FCGI > kind of pointless. I wrote a little FCGI app which prints when the program > is > loaded and whe

Re: FCGI app reloading on every request

2007-09-04 Thread John Nagle
Michael Ströder wrote: > John Nagle wrote: > >>What's actually happening is that FCGI isn't running at all. >>My .fcgi file is being executed by Apache's CGI handler, and >>"fcgi.py" recognizes this, then reads the parameters as if >>a CGI program. So it works just like a CGI program: one >>l

Re: Printing lists in columns (was: TypeError: 'module object is not callable')

2007-09-04 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > I know this makes me sound very stupid but how would I specify > in the parameter the inner lists without having to write them all out > such as: > > for row in izip_longest(d[0], d[1], d[2], fillvalue='*'): > print ', '.join(row) > > i.e. How could I do the follow

Re: scipy.org website

2007-09-04 Thread Robert Kern
Hiten Madhani wrote: > Hi, > > The scipy.org website has been down. Does anyone know whether it is > coming back up? It is back up now. We're working on making it more stable. We're getting a lot more traffic than we used to. http://projects.scipy.org/pipermail/scipy-user/2007-September/01357

Re: Calling a dos batch file from python

2007-09-04 Thread kyosohma
On Sep 4, 8:42 am, n o s p a m p l e a s e <[EMAIL PROTECTED]> wrote: > Suppose I have a batch file called mybatch.bat and I want to run it > from a python script. How can I call this batch file in python script? > > Thanx/NSP The subprocess module should work. Mike -- http://mail.python.org/m

Re: Parse or Pass?

2007-09-04 Thread frenchy64
> In general, "parsing" is analyzing the grammatical structure of a > string. People sometimes talk loosely about "parsing the command line". > but I don't think that's normally applied to providing the actual > arguments (corresponding to the definition's "formal parameters") when a > function is

Re: Printing lists in columns

2007-09-04 Thread cjt22
On Sep 4, 3:20 pm, Bruno Desthuilliers wrote: > [EMAIL PROTECTED] a écrit : > (snip) > > > Thanks guys > > > I have a list of lists such as > > a = ["1" , "2"] b = ["4", "5", "6"] c = ["7",8", "9"] > > Stored in another list: d = [a,b,c] > > > I know this makes me sound very stupid but how woul

Re: Printing lists in columns

2007-09-04 Thread cjt22
On Sep 4, 3:20 pm, Bruno Desthuilliers wrote: > [EMAIL PROTECTED] a écrit : > (snip) > > > Thanks guys > > > I have a list of lists such as > > a = ["1" , "2"] b = ["4", "5", "6"] c = ["7",8", "9"] > > Stored in another list: d = [a,b,c] > > > I know this makes me sound very stupid but how woul

Re: Parse or Pass?

2007-09-04 Thread Steve Holden
frenchy64 wrote: > I'm very confused...I want to describe passing variables to functions > and I've seen these two words used in very similar contexts. > > Is there a difference between them? > In general, "parsing" is analyzing the grammatical structure of a string. People sometimes talk loosel

Parse or Pass?

2007-09-04 Thread frenchy64
I'm very confused...I want to describe passing variables to functions and I've seen these two words used in very similar contexts. Is there a difference between them? -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with TreeView + ListStore

2007-09-04 Thread Ali
On Sep 4, 10:43 am, Guillermo Heizenreder <[EMAIL PROTECTED]> wrote: > Hi list > I'm developing a application for learn pygkt, and I need to know when a > user selected or clicked one determinate row of my TreeView for shot > another signal . Hi, Well, ignoring the rest of the post, I can tell yo

gucci shoes,LV handbag chanel levi's kobe max

2007-09-04 Thread cheapestsell
Cheap sport shoe www.cheapestsell.com Hotmail:[EMAIL PROTECTED] Yahoo: [EMAIL PROTECTED] www.cheapestsell.com Nike Air Jordan 1 ,Nike Air Jordan 2 Shoes,Nike Air Jordan 3,Nike Air Jordan 4 Shoes ,Nike Air Jordan 5 Chaussure Shoes,Nike Air Jordan 6 Catalog ,Nike Air Jordan 7 Shoes Catalog , Nike Ai

Re: Printing lists in columns

2007-09-04 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : (snip) > Thanks guys > > I have a list of lists such as > a = ["1" , "2"] b = ["4", "5", "6"] c = ["7",8", "9"] > Stored in another list: d = [a,b,c] > > I know this makes me sound very stupid but how would I specify > in the parameter the inner lists without havin

GC performance with lists

2007-09-04 Thread jonas
While working on some python wrapping, I've run into some problems where the GC seems to take an unreasonable amount of time to run. The code below is a demonstration: import gc #gc.disable() data = [] for i in xrange(10): shortdata = [] for j in range(57): mytuple = (j, i+1,

Re: Setting Current Dir in Python

2007-09-04 Thread Tim Couper
Steve Of course it is. I'd like to think I left a test for the observant, but in reality it just shows I can't copy-type ... :-) Tim Dr Tim Couper CTO, SciVisum Ltd www.scivisum.com Steve Holden wrote: > Tim Couper wrote: > >> "Non-ASCII character '\xef' in file" >> >> SandhirFileMonit

Re: Printing lists in columns (was: TypeError: 'module object is not callable')

2007-09-04 Thread cjt22
On Sep 4, 2:06 pm, Duncan Booth <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > >> But watch out if the lists aren't all the same length: zip won't pad out > >> any sequences, so it maynotbe exactly what is wanted here: > > >> >>> x = ['1', '2', '3'] > >> >>> y = ['4', '5'] > >> >>> for row

Calling a dos batch file from python

2007-09-04 Thread n o s p a m p l e a s e
Suppose I have a batch file called mybatch.bat and I want to run it from a python script. How can I call this batch file in python script? Thanx/NSP -- http://mail.python.org/mailman/listinfo/python-list

Tkinter(2)

2007-09-04 Thread vijayca
my python installation is:Active python 2.5.1 i am using Red Hat Linux i have the Tkinter module installed but any simple script produces an error script: from Tkinter import Label widget = Label(None, text='Hello GUI world!') widget.pack() widget.mainloop() error: Traceback (most recent cal

Re: REGULAR EXPRESSION

2007-09-04 Thread Steve Holden
AniNair wrote: > hi.. I am trying to match '+ %&/-' etc using regular expression in > expressions like 879+34343. I tried \W+ but it matches only in the > beginning of the string Plz help Thanking you in advance... > Perhaps you could give a few example of strings that should and shouldn't mat

Re: Setting Current Dir in Python

2007-09-04 Thread Steve Holden
Tim Couper wrote: > "Non-ASCII character '\xef' in file" > > SandhirFileMonitor.py on line 356, > > This is reason for the failure .. you have a (probably accidentally placed) > non-ascii (ie whose value is > 128) character on line 356, whose hex value is > ef (decimal 259) . Solution: find th

  1   2   >