the best ABOUT MP3 this year. have alook...

2008-04-16 Thread ghgggu
http://www.soundofmp3.info -- http://mail.python.org/mailman/listinfo/python-list

sampling without replacement

2008-04-16 Thread braver
Greetings -- I am doing a sampling without replacement, taking out random elements from an array. The picked element is then removed from the array. When my arrays were on the order of 10,000 elements long, everything was fast. But when I increased them to 1,000,000 it suddenly was hours. I tra

Re: Python plugin for Firefox

2008-04-16 Thread Steve Holden
zelegolas wrote: > Hi, > > It's may be a stupid question but do you if someone tried to create a > python plugin for firefox? > If you know an Open Source project let me know... > > Thanks Look for references to Mark Hammond's PyCon keynote and the work he's been doing with the Mozilla team. r

Re: I just killed GIL!!!

2008-04-16 Thread Torsten Bronger
Hallöchen! Tim Daneliuk writes: > Daniel Fetchinson wrote: > >> [...] >> >>> I just had one moment of exceptional clarity, during which >>> realized how I could get the GIL out of my way... It's so >>> simple, I cannot help wondering why nobody has thought of it >>> before. [...] >> >> If I were

Re: I just killed GIL!!!

2008-04-16 Thread Tim Daneliuk
Daniel Fetchinson wrote: >> Hello Guys... >> >> I just had one moment of exceptional clarity, during which realized >> how I could get the GIL out of my way... It's so simple, I cannot help >> wondering why nobody has thought of it before. Duh! Now I am going to >> sit and and marvel at my creation

Re: Default parameter for a method

2008-04-16 Thread George Sakkis
On Apr 16, 4:21 pm, John Nagle <[EMAIL PROTECTED]> wrote: > In general, default values should be immutable constants only. This is more restrictive than necessary; it should rather read "In general, default values should be *treated as* immutable objects only". It's perfectly fine for a default v

Python plugin for Firefox

2008-04-16 Thread zelegolas
Hi, It's may be a stupid question but do you if someone tried to create a python plugin for firefox? If you know an Open Source project let me know... Thanks -- http://mail.python.org/mailman/listinfo/python-list

DBXML and removeDocument in Python

2008-04-16 Thread Peter Robinson
I am trying to add and remove documents in a container in Berkeley/ Oracle DB XML within Python, on Mac OS X Leopard. putDocument works fine, but I keep getting 'attributeError' when I try removeDocument. I can't find any documentation on removeDocument in Python and it is not in the examples.

Re: urllib working differently when run from crontab

2008-04-16 Thread VictorMiller
On Apr 14, 8:33 am, Matthew Woodcraft <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > > VictorMiller <[EMAIL PROTECTED]> wrote: > > I've written a python script which, using urllib, and urllib2 will > > fetch a number of files that that I'm interested in from various > > websites (t

Re: Default parameter for a method

2008-04-16 Thread Terry Reedy
"John Nagle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | [EMAIL PROTECTED] wrote: | > I wanted to know if there's any way to create a method that takes a | > default parameter, and that parameter's default value is the return | > value of another method of the same class. For ex

Re: def power, problem when raising power to decimals

2008-04-16 Thread Terry Reedy
"Mark Dickinson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Apr 16, 4:19 pm, [EMAIL PROTECTED] wrote: > how do i solve power(5,1.3)? > [...] > > also i found a link which states 0^0 isnt 1 even though every > calculator ive tried says it is. > it doesnt say what it is but i pr

RE: Splitting MainWindow Class over several modules.

2008-04-16 Thread Ryan Ginstrom
> On Behalf Of Mike Driscoll > I don't think there's anything wrong with it. The main thing > to remember is to try to keep the interface and the logic > separate. I have a fairly complex program with lots of tabs > and sub tabs. So I stuck each of the tab's display code in a > separate file an

Re: Finally had to plonk google gorups.

2008-04-16 Thread John Salerno
Grant Edwards wrote: > This morning almost half of c.l.p was spam. In order to try to > not tar both the benign google group users and the malignant > ones with the same brush, I've been trying to kill usenet spam > with subject patterns. But that's not a battle you can win, so > I broke down and

Re: Profiling, recursive func slower than imperative, normal?

2008-04-16 Thread Terry Reedy
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | the 0.409 vs 0.095 is the total times right? | so the imperative function is >4 times faster than the recursive. | or what does tottime stand for? | | is this always the case that the recursive function is slower? | the gain is less co

Metaprogramming Example

2008-04-16 Thread andrew cooke
Hi, Thanks for the help a couple of days ago. I completed what I was doing and wrote a summary which I've posted at http://acooke.org/cute/PythonMeta0.html (it's kind of long to post here). I hope it might be useful to someone else - it's complete code for a simple metaprogramming task that us

Re: index of list of lists

2008-04-16 Thread Daniel Fetchinson
> yes, there's a thread with the same title, but I believe mine is more > appropriate title. > so, as much as I search on the web, read manuals, tutorials, mail-lists > (including this one) I cannot figure it out how to search a string in a > list of lists. > like this one: > > someList = [['somest

Python and stale file handles

2008-04-16 Thread tgiles
Hi, All! I started back programming Python again after a hiatus of several years and run into a sticky problem that I can't seem to fix, regardless of how hard I try- it it starts with tailing a log file. Basically, I'm trying to tail a log file and send the contents elsewhere in the script (here

Re: I just killed GIL!!!

2008-04-16 Thread Daniel Fetchinson
> Hello Guys... > > I just had one moment of exceptional clarity, during which realized > how I could get the GIL out of my way... It's so simple, I cannot help > wondering why nobody has thought of it before. Duh! Now I am going to > sit and and marvel at my creation for a while, and then go to be

index of list of lists

2008-04-16 Thread Daniel NL
yes, there's a thread with the same title, but I believe mine is more appropriate title. so, as much as I search on the web, read manuals, tutorials, mail-lists (including this one) I cannot figure it out how to search a string in a list of lists. like this one: someList = [['somestring', 1, 2]

Re: TypeNone field detection

2008-04-16 Thread Mensanator
On Apr 16, 7:24 pm, Joe Blow <[EMAIL PROTECTED]> wrote: > What is the best way to detect a TypeNone field in a tuple, or in a list? > > I am accessing a MySQL database using the MySQLdb Python interface... this > interface returns a tuple object type in response to SQL SELECT > statements.  My unde

Re: TypeNone field detection

2008-04-16 Thread Steve Holden
Joe Blow wrote: > What is the best way to detect a TypeNone field in a tuple, or in a list? > > I am accessing a MySQL database using the MySQLdb Python interface... this > interface returns a tuple object type in response to SQL SELECT > statements. My understanding of the MySQLdb interface is t

Re: Logical Operator and code block not executing (newbie question)

2008-04-16 Thread Ben Kaplan
The problem is that your loop says "while guess != number". When guess is equal to the number, the code in the loop is not executed. Instead, do something like while guess != number and tries < total_attempts: if guess > number: ... elif guess < number: ... if guess == number :

Re: How is GUI programming in Python?

2008-04-16 Thread sturlamolden
On Apr 16, 4:17 am, [EMAIL PROTECTED] wrote: > Reformulating my question: > > Which GUI tool, wxPython or PyQt, is more pythonic? (Please, ignore > the license issue because I am thinking about FOSS) None of them, all three of them (you forgot PyGTK), or it doesn't matter more. Nobody with their

Logical Operator and code block not executing (newbie question)

2008-04-16 Thread python newbie
Hello, I am running into a small problem of not having a code block not executing after after a logical operator is true. What am I missing or doing wrong. Any thoughts or opinions would be greatly appreciated. The block that isn't being executed follows: elif (guess == the_number) and (

I just killed GIL!!!

2008-04-16 Thread sturlamolden
Hello Guys... I just had one moment of exceptional clarity, during which realized how I could get the GIL out of my way... It's so simple, I cannot help wondering why nobody has thought of it before. Duh! Now I am going to sit and and marvel at my creation for a while, and then go to bed (it's pas

TypeNone field detection

2008-04-16 Thread Joe Blow
What is the best way to detect a TypeNone field in a tuple, or in a list? I am accessing a MySQL database using the MySQLdb Python interface... this interface returns a tuple object type in response to SQL SELECT statements. My understanding of the MySQLdb interface is that NULL database values a

Re: Finally had to plonk google gorups.

2008-04-16 Thread Kam-Hung Soh
On Apr 17, 1:14 am, Mike Kent <[EMAIL PROTECTED]> wrote: > On Apr 16, 10:26 am, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > Yeah, I noticed that Google Groups has really sucked this week. I'm > > using the Google Groups Killfile for Greasemonkey now and it helps a > > lot. I like Google, but my

Re: Death of NNTP greatly exaggerated

2008-04-16 Thread Steve Holden
Ben Finney wrote: > Michael Torrie <[EMAIL PROTECTED]> writes: > >> I rarely use NNTP these days. I access c.l.py exclusively via e-mail, >> and that works very well. > > I rarely use email for technical mailing lists these days. I access > such forums exclusively via NNTP nntp://news.gmane.org>

Re: How to have unittest tests to be executed in the order they appear?

2008-04-16 Thread Roy Smith
Ben Finney <[EMAIL PROTECTED]> wrote: > Surely, since "suddenly" implies you changed one small area of the > code, that area of the code is the best place to look for what caused > the failure. Sometimes it's the environment that's changed. Yes, I know, a good unit test doesn't depend on the en

Re: How to have unittest tests to be executed in the order they appear?

2008-04-16 Thread Matthew Woodcraft
Ben Finney <[EMAIL PROTECTED]> wrote: > Surely, since "suddenly" implies you changed one small area of the > code, that area of the code is the best place to look for what caused > the failure. Imagine that "suddenly" immediately follows "I upgraded to etch". -M- -- http://mail.python.org/mailm

Re: [Python-Dev] Global Python Sprint Weekends: May 10th-11th and June 21st-22nd.

2008-04-16 Thread Thomas Lee
Anyone in Melbourne, Australia keen for the first sprint? I'm not sure if I'll be available, but if I can it'd be great to work with some others. Failing that, it's red bull and pizza in my lounge room :) I've been working on some neat code for an AST optimizer. If I'm free that weekend, I'll p

Re: Creating arithmetic sequences

2008-04-16 Thread Robert Kern
mmm wrote: > I wrote the code below to create simple arithmetic sequences that are > iter-able > I.e., this would basically combine the NUMPY arange(start,end,step) > to range(start,end), with step not necessarily an integer. > > The code below is in its simplest form and I want to generalize th

Re: import hooks

2008-04-16 Thread Gabriel Genellina
En Wed, 16 Apr 2008 09:04:36 -0300, Patrick Stinson <[EMAIL PROTECTED]> escribió: > I am defining a simple finder/loader object and adding it to > sys.meta_path > like this: > > PyRun_SimpleString("import sys; import ousiainternal; sys.meta_path = > [ousiainternal.OusiaImporter]"); You should

Re: def power, problem when raising power to decimals

2008-04-16 Thread Mensanator
On Apr 16, 5:49 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 16 Apr 2008 19:21:18 -0300, John Machin <[EMAIL PROTECTED]>   > escribió: > > > [EMAIL PROTECTED] wrote: > >> also i found a link which states 0^0 isnt 1 even though every > >> calculator ive tried says it is. > >> it does

Re: def power, problem when raising power to decimals

2008-04-16 Thread Gabriel Genellina
En Wed, 16 Apr 2008 19:21:18 -0300, John Machin <[EMAIL PROTECTED]> escribió: > [EMAIL PROTECTED] wrote: >> also i found a link which states 0^0 isnt 1 even though every >> calculator ive tried says it is. >> it doesnt say what it is but i presume 0 then. >> but it seems the dude is wrong and it

Re: How to have unittest tests to be executed in the order they appear?

2008-04-16 Thread Ben Finney
Matthew Woodcraft <[EMAIL PROTECTED]> writes: > Ben Finney <[EMAIL PROTECTED]> wrote: > > Your test cases should *not* depend on any state from other test > > cases; they should function equally well when executed in any > > arbitrary sequence. Dependencies between separate test cases (e.g. > > "

Re: Profiling, recursive func slower than imperative, normal?

2008-04-16 Thread Gabriel Genellina
En Wed, 16 Apr 2008 17:53:16 -0300, <[EMAIL PROTECTED]> escribió: > On Apr 16, 3:27 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > >> Any function can be implemented without recursion, although it isn't >> always easy or fun. >> > Really? I'm curious about that, I can't figure out how that w

Re: def power, problem when raising power to decimals

2008-04-16 Thread John Machin
[EMAIL PROTECTED] wrote: > how do i solve power(5,1.3)? Is this a trick question? OK, I'll bite: >>> 5 ** 1.3 8.1032829834638136 >>> > > def power(nbr, po): > if po==0: > return 1 > if po>0: > return nbr*power(nbr, po-1) > if po<0: > return 1/power(nbr, -1*

Death of NNTP greatly exaggerated (was: Finally had to plonk google gorups.)

2008-04-16 Thread Ben Finney
Michael Torrie <[EMAIL PROTECTED]> writes: > I rarely use NNTP these days. I access c.l.py exclusively via e-mail, > and that works very well. I rarely use email for technical mailing lists these days. I access such forums exclusively via NNTP nntp://news.gmane.org>, and that works very well. >

Re: Passing the output of a thread to the caller.

2008-04-16 Thread Gabriel Genellina
En Wed, 16 Apr 2008 16:29:48 -0300, Marlin Rowley <[EMAIL PROTECTED]> escribió: > I have a thread that I've created from a main program. I started this > thread and passed it a function to execute. Within this function are > 'print' statements. While they are directly translated to the st

Re: Brand New!

2008-04-16 Thread s0suk3
On Apr 14, 9:00 pm, agent E 10 <[EMAIL PROTECTED]> wrote: >Hi, I'm brand new to programming. Have any suggestions? I'm young. > Was it a good idea to start with python? I was planning on creating a > very simple program that asked yes/no questions for a school project. > > -Thanks! Hey! That's

Re: py3k s***s

2008-04-16 Thread Carl Banks
On Apr 16, 12:40 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: > On Apr 16, 12:27 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > > On Apr 16, 6:56 am, Aaron Watters <[EMAIL PROTECTED]> wrote: > > > > I don't get it. It ain't broke. Don't fix it. > > > So how would you have done the old-style cla

Re: py3k s***s

2008-04-16 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: > Aaron Watters wrote: > > The cost paid for these minor improvements is too high in my > > book. But I suppose if it is going to happen do it sooner > > rather than later. Just *please* *please* don't > > systematically b

Re: How to have unittest tests to be executed in the order they appear?

2008-04-16 Thread Matthew Woodcraft
Ben Finney <[EMAIL PROTECTED]> wrote: >"Giampaolo Rodola'" <[EMAIL PROTECTED]> writes: >> Is there a way to force unittest to run test methods in the order >> they appear? > No, and this is a good thing. > Your test cases should *not* depend on any state from other test > cases; they should func

Re: vary number of loops

2008-04-16 Thread nullgraph
On Apr 16, 10:12 am, "Reedick, Andrew" <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:python- > > [EMAIL PROTECTED] On Behalf Of Tim Chase > > Sent: Wednesday, April 16, 2008 9:53 AM > > To: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > > Subject: Re:

Open source Web testing tool - cPAMIE 1.6b released

2008-04-16 Thread Gerry Paneda
Hi Rob, I have been watching your videos in ShowMeDo and first of all thanks - I just started looking at Automation again and this got me started fairly easy. I do have a question though. 2.0 does not seem to have getConfig and writeScript from the one I downloaded from sourceforge. I went t

slovar crack

2008-04-16 Thread wwzaygvm
slovar crack http://cracks.12w.net F R E E C R A C K S -- http://mail.python.org/mailman/listinfo/python-list

originlab crack serial

2008-04-16 Thread wwzaygvm
originlab crack serial http://cracks.12w.net F R E E C R A C K S -- http://mail.python.org/mailman/listinfo/python-list

stalker crack

2008-04-16 Thread wwzaygvm
stalker crack http://cracks.12w.net F R E E C R A C K S -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k s***s

2008-04-16 Thread Marc 'BlackJack' Rintsch
On Wed, 16 Apr 2008 12:32:00 -0700, Aaron Watters wrote: >> > Perhaps this will inspire improved linters and better coding >> > practices >> >> Better coding practices such as extensive unit tests? > > Greetings from Earth. What planet are you from? :) > > There is always the possibility th

indesign cs2 crack

2008-04-16 Thread wwzaygvm
indesign cs2 crack http://cracks.12w.net F R E E C R A C K S -- http://mail.python.org/mailman/listinfo/python-list

win xp sp2 keygen

2008-04-16 Thread wwzaygvm
win xp sp2 keygen http://cracks.12w.net F R E E C R A C K S -- http://mail.python.org/mailman/listinfo/python-list

partition manager 8.5 keygen

2008-04-16 Thread wwzaygvm
partition manager 8.5 keygen http://cracks.12w.net F R E E C R A C K S -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k s***s

2008-04-16 Thread Steve Holden
Aaron Watters wrote: > On Apr 16, 2:33 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: >> The point is, you can't have it both ways. Either you evolve the >> language and break things, or you keep it static and nothing breaks. > > I disagree. You can add lots of cool > stuff without breaking the ex

trading software cracks

2008-04-16 Thread wwzaygvm
trading software cracks http://cracks.12w.net F R E E C R A C K S -- http://mail.python.org/mailman/listinfo/python-list

fireworks cs3 crack

2008-04-16 Thread wwzaygvm
fireworks cs3 crack http://cracks.12w.net F R E E C R A C K S -- http://mail.python.org/mailman/listinfo/python-list

hippie patch work clothes and purses

2008-04-16 Thread wwzaygvm
hippie patch work clothes and purses http://cracks.12w.net F R E E C R A C K S -- http://mail.python.org/mailman/listinfo/python-list

windows live onecare keygen

2008-04-16 Thread wwzaygvm
windows live onecare keygen http://cracks.12w.net F R E E C R A C K S -- http://mail.python.org/mailman/listinfo/python-list

xilisoft video converter crack

2008-04-16 Thread wwzaygvm
xilisoft video converter crack http://cracks.12w.net F R E E C R A C K S -- http://mail.python.org/mailman/listinfo/python-list

audio mid recorder 3.95 and crack

2008-04-16 Thread wwzaygvm
audio mid recorder 3.95 and crack http://cracks.12w.net F R E E C R A C K S -- http://mail.python.org/mailman/listinfo/python-list

Re: Profiling, recursive func slower than imperative, normal?

2008-04-16 Thread s0suk3
On Apr 16, 3:27 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > Any function can be implemented without recursion, although it isn't > always easy or fun. > > Jean-Paul Really? I'm curious about that, I can't figure out how that would work. Could give an example? Say, for example, the typica

Re: str class inheritance prob?

2008-04-16 Thread s0suk3
On Apr 16, 1:43 pm, [EMAIL PROTECTED] wrote: > so I’m trying to create a class that inherits from str, but I want to > run some code on the value on object init. this is what I have: > > class Path(str): > def __init__( self, path ): > clean = str(path).replace(

Re: def power, problem when raising power to decimals

2008-04-16 Thread Mark Dickinson
On Apr 16, 4:19 pm, [EMAIL PROTECTED] wrote: > how do i solve power(5,1.3)? > [...] > > also i found a link which states 0^0 isnt 1 even though every > calculator ive tried says it is. > it doesnt say what it is but i presume 0 then. > but it seems the dude is wrong and it is 1? >>> 5**1.3 8.10328

Re: Profiling, recursive func slower than imperative, normal?

2008-04-16 Thread Jean-Paul Calderone
On Wed, 16 Apr 2008 13:18:22 -0700 (PDT), [EMAIL PROTECTED] wrote: >the 0.409 vs 0.095 is the total times right? >so the imperative function is >4 times faster than the recursive. >or what does tottime stand for? > >is this always the case that the recursive function is slower? >the gain is less co

Re: Finally had to plonk google gorups.

2008-04-16 Thread Michael Torrie
On Wed, Apr 16, 2008 at 11:49 AM, Mike Driscoll <[EMAIL PROTECTED]> wrote: > I don't think I like the email list idea all that much. I'm already on > a number of them and they fill up my box like crazy. Besides that, in > email format it's hard to follow the thread, so one moment I'm reading > abo

def power, problem when raising power to decimals

2008-04-16 Thread skanemupp
how do i solve power(5,1.3)? def power(nbr, po): if po==0: return 1 if po>0: return nbr*power(nbr, po-1) if po<0: return 1/power(nbr, -1*po) also i found a link which states 0^0 isnt 1 even though every calculator ive tried says it is. it doesnt say what it is

Profiling, recursive func slower than imperative, normal?

2008-04-16 Thread skanemupp
the 0.409 vs 0.095 is the total times right? so the imperative function is >4 times faster than the recursive. or what does tottime stand for? is this always the case that the recursive function is slower? the gain is less code? are some functions only implementable recursively? def power(nbr,

Re: Default parameter for a method

2008-04-16 Thread John Nagle
[EMAIL PROTECTED] wrote: > I wanted to know if there's any way to create a method that takes a > default parameter, and that parameter's default value is the return > value of another method of the same class. For example: > ... > > def meth2(self, arg=meth1()): Not good. If the defaul

Re: Finally had to plonk google gorups.

2008-04-16 Thread Mensanator
On Apr 16, 1:43 pm, Severian <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > > On 2008-04-16, Mensanator <[EMAIL PROTECTED]> wrote: > >> On Apr 16, 9:19 am, Grant Edwards <[EMAIL PROTECTED]> wrote: > >>> This morning almost half of c.l.p was spam.  In order to try > >>> to not tar both the beni

Re: Does Python use a special home-made parser, or does it use Yacc?

2008-04-16 Thread Martin v. Löwis
Robert wrote: > Or some other pre-packaged parser tool? None of them: it's not YACC, not a pre-packaged parser tool, and not a home-made parser. Instead, it uses pgen, a parser tool that is included in the Python distribution (whether *that* was made at home or at work, I don't know :-). Regards,

Re: What can we do about all the spam that the list is getting?

2008-04-16 Thread Mark Shroyer
In article <[EMAIL PROTECTED]>, Mensanator <[EMAIL PROTECTED]> wrote: > On Apr 16, 12:01 pm, [EMAIL PROTECTED] wrote: > > What can we do about all the spam that comp.lang.python is getting? > > Things are getting pretty bad. > > Buy Google and make them fix it. I've had pretty good luck with M

Does Python use a special home-made parser, or does it use Yacc?

2008-04-16 Thread Robert
Or some other pre-packaged parser tool? -- http://mail.python.org/mailman/listinfo/python-list

Re: py3k s***s

2008-04-16 Thread Rhamphoryncus
On Apr 16, 12:52 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: > On Apr 16, 2:33 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > > The point is, you can't have it both ways. Either you evolve the > > language and break things, or you keep it static and nothing breaks. > > I disagree. You can add

Re: py3k s***s

2008-04-16 Thread [EMAIL PROTECTED]
On Apr 16, 2:52 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: > I disagree. You can add lots of cool > stuff without breaking the existing code base, mostly. > For example the minor changes to the way ints will work will > effect almost no programs. Wow, I'd venture that the division changes wit

Re: py3k s***s

2008-04-16 Thread Aaron Watters
> > Also in the case of C/java etc changing the infrastructure > > is less scary because you usually find out about problems > > when the compile or link fails. For Python you may not find > > out about it until the program has been run many times. > > Perhaps this will inspire improved linters a

Re: Default parameter for a method

2008-04-16 Thread Peter Otten
Cliff Wells wrote: > > On Wed, 2008-04-16 at 13:47 -0500, Larry Bates wrote: >> [EMAIL PROTECTED] wrote: >> > I wanted to know if there's any way to create a method that takes a >> > default parameter, and that parameter's default value is the return >> > value of another method of the same class

Passing the output of a thread to the caller.

2008-04-16 Thread Marlin Rowley
I have a thread that I've created from a main program. I started this thread and passed it a function to execute. Within this function are 'print' statements. While they are directly translated to the stdout, I would love to return them back to the program itself and store them in an object.

Re: py3k s***s

2008-04-16 Thread Gabriel Genellina
En Wed, 16 Apr 2008 13:09:05 -0300, Aaron Watters <[EMAIL PROTECTED]> escribió: > On Apr 16, 11:15 am, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >> On 16 abr, 09:56, Aaron Watters <[EMAIL PROTECTED]> wrote: >> >> > In my opinion python's adherence to backwards compatibility >> > has been a bi

Re: str class inheritance prob?

2008-04-16 Thread Jerry Hill
On Wed, Apr 16, 2008 at 2:35 PM, Hamish McKenzie <[EMAIL PROTECTED]> wrote: > so I'm trying to create a class that inherits from str, but I want to run > some code on the value on object init. this is what I have: You actually want to run your code when creating the new object, not when initializ

Re: Default parameter for a method

2008-04-16 Thread Cliff Wells
On Wed, 2008-04-16 at 13:47 -0500, Larry Bates wrote: > [EMAIL PROTECTED] wrote: > > I wanted to know if there's any way to create a method that takes a > > default parameter, and that parameter's default value is the return > > value of another method of the same class. For example: > > > > clas

Re: Interesting timing issue I noticed

2008-04-16 Thread Dan Upton
On Wed, Apr 16, 2008 at 2:54 PM, Gabriel Genellina <[EMAIL PROTECTED]> wrote: > En Wed, 16 Apr 2008 10:36:14 -0300, Jonathan Shao <[EMAIL PROTECTED]> > escribió: > > *Gabriel Genellina* gagsl-py2 at yahoo.com.ar > > > > > *Wed Apr 16 08:44:10 CEST 2008* > > >> Another thing would be to rearra

str class inheritance prob?

2008-04-16 Thread Hamish McKenzie
so I'm trying to create a class that inherits from str, but I want to run some code on the value on object init. this is what I have: class Path(str): def __init__( self, path ): clean = str(path).replace('\\','/') while clean.f

Re: py3k s***s

2008-04-16 Thread Aaron Watters
On Apr 16, 2:33 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > The point is, you can't have it both ways. Either you evolve the > language and break things, or you keep it static and nothing breaks. I disagree. You can add lots of cool stuff without breaking the existing code base, mostly. For e

Re: Interesting timing issue I noticed

2008-04-16 Thread Gabriel Genellina
En Wed, 16 Apr 2008 10:36:14 -0300, Jonathan Shao <[EMAIL PROTECTED]> escribió: > *Gabriel Genellina* gagsl-py2 at yahoo.com.ar > > *Wed Apr 16 08:44:10 CEST 2008* >> Another thing would be to rearrange the loops so the outer one executes > less times; if you know that borderX< better to swap th

Re: Default parameter for a method

2008-04-16 Thread Larry Bates
[EMAIL PROTECTED] wrote: > I wanted to know if there's any way to create a method that takes a > default parameter, and that parameter's default value is the return > value of another method of the same class. For example: > > class A: > def __init__(self): > self.x = 1 > > def me

str class inheritance prob?

2008-04-16 Thread jkazoo
so I’m trying to create a class that inherits from str, but I want to run some code on the value on object init. this is what I have: class Path(str): def __init__( self, path ): clean = str(path).replace('\\','/') while clean.find('//'

Re: Finally had to plonk google gorups.

2008-04-16 Thread Severian
Grant Edwards wrote: > On 2008-04-16, Mensanator <[EMAIL PROTECTED]> wrote: >> On Apr 16, 9:19 am, Grant Edwards <[EMAIL PROTECTED]> wrote: >>> This morning almost half of c.l.p was spam. In order to try >>> to not tar both the benign google group users and the >>> malignant ones with the same bru

Re: insert python script in current script

2008-04-16 Thread Larry Bates
Prashant wrote: > I was wondering is there any way to do this: > > I have written a class in python and __init__ goes like this: > > def __init__(self): > > self.name = 'jack' > self.age = 50 > > import data > > > > > now here there is data.py in the same directory and contents are like: >

Re: [Python-Dev] Global Python Sprint Weekends: May 10th-11th and June 21st-22nd.

2008-04-16 Thread Michael Foord
Trent Nelson wrote: > Following on from the success of previous sprint/bugfix weekends and > sprinting efforts at PyCon 2008, I'd like to propose the next two > Global Python Sprint Weekends take place on the following dates: > > * May 10th-11th (four days after 2.6a3 and 3.0a5

Re: py3k s***s

2008-04-16 Thread Rhamphoryncus
On Apr 16, 12:10 pm, Aaron Watters <[EMAIL PROTECTED]> wrote: > On Apr 16, 1:42 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > > > The only reason to not make the > > changes is that old, crufty, unmaintained libraries & applications > > might depend on them somehow. If that's more important to

Re: Finally had to plonk google gorups.

2008-04-16 Thread lbonafide
On Apr 16, 11:06 am, Steve Holden <[EMAIL PROTECTED]> wrote: > I'm not saying people shouldn't use Google Groups. I'm saying that > Google can "justify" providing customer "support" that lives somewhere > between zero and extremely crappy by not charging for the service. It's even worse than that

Re: Finally had to plonk google gorups.

2008-04-16 Thread Grant Edwards
On 2008-04-16, Mensanator <[EMAIL PROTECTED]> wrote: > On Apr 16, 9:19 am, Grant Edwards <[EMAIL PROTECTED]> wrote: >> This morning almost half of c.l.p was spam.  In order to try >> to not tar both the benign google group users and the >> malignant ones with the same brush, I've been trying to kil

Re: Finally had to plonk google gorups.

2008-04-16 Thread J. Cliff Dyer
On Wed, 2008-04-16 at 10:49 -0700, Mike Driscoll wrote: > On Apr 16, 12:40 pm, "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote: > > On Wed, 16 Apr 2008 08:23:50 -0700 (PDT) > > > > Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > My workplace doesn't offer NNTP, so there is no good way to browse > > > c

Re: Finally had to plonk google gorups.

2008-04-16 Thread J. Cliff Dyer
On Wed, 2008-04-16 at 12:06 -0400, Steve Holden wrote: > Mike Driscoll wrote: > > On Apr 16, 10:09 am, Steve Holden <[EMAIL PROTECTED]> wrote: > >> Mike Driscoll wrote: > >>> On Apr 16, 9:19 am, Grant Edwards <[EMAIL PROTECTED]> wrote: > This morning almost half of c.l.p was spam. In order to

Re: py3k s***s

2008-04-16 Thread Aaron Watters
On Apr 16, 1:42 pm, Rhamphoryncus <[EMAIL PROTECTED]> wrote: > The only reason to not make the > changes is that old, crufty, unmaintained libraries & applications > might depend on them somehow. If that's more important to you, what > you really want is a language who's specs are frozen - much

Re: Finally had to plonk google gorups.

2008-04-16 Thread Dan Upton
On Wed, Apr 16, 2008 at 1:49 PM, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On Apr 16, 12:40 pm, "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote: > > I don't think I like the email list idea all that much. I'm already on > a number of them and they fill up my box like crazy. Besides that, in > emai

Re: Finally had to plonk google gorups.

2008-04-16 Thread Torsten Bronger
Hallöchen! D'Arcy J.M. Cain writes: > On Wed, 16 Apr 2008 09:11:09 -0700 > "Daniel Fetchinson" <[EMAIL PROTECTED]> wrote: > >> Full disclosure: I'm using google groups for both reading and >> writing. > > You are? Maybe, but not with this posting. It was sent through the mailing list. By the w

Re: Finally had to plonk google gorups.

2008-04-16 Thread D'Arcy J.M. Cain
On Wed, 16 Apr 2008 10:39:16 -0600 Michael Torrie <[EMAIL PROTECTED]> wrote: > Running a few lists myself, I don't see this. How is administrative > overhead tedious? Most open source projects do it, so I wonder just how > tedious it is. Of all the projects I'm associated with in lists, Python >

Re: Finally had to plonk google gorups.

2008-04-16 Thread D'Arcy J.M. Cain
On Wed, 16 Apr 2008 09:11:09 -0700 "Daniel Fetchinson" <[EMAIL PROTECTED]> wrote: > Full disclosure: I'm using google groups for both reading and writing. You are? I guess I don't have my filter set correctly then. Can someone please tell me what headers indicate that it is a Google groups posti

Re: Finally had to plonk google gorups.

2008-04-16 Thread Mike Driscoll
On Apr 16, 11:06 am, Steve Holden <[EMAIL PROTECTED]> wrote: > Mike Driscoll wrote: > > On Apr 16, 10:09 am, Steve Holden <[EMAIL PROTECTED]> wrote: > >> Mike Driscoll wrote: > >>> On Apr 16, 9:19 am, Grant Edwards <[EMAIL PROTECTED]> wrote: > This morning almost half of c.l.p was spam. In or

  1   2   3   >