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 tracked it down to the line I first threw in to
cut out the element i:

a = a[:i] + a[i+1:]

It was indeed the weakest link.  But when I replace it with e.g.

a.pop(i)

it is still slow.

I wonder what approach can be taken to speed it up?  Basically, the
algorithm picks an element from the array at random and checks its
size in a different hashtable i=>size.  If the size fits into an
existing accumulator, i.e. is below a threshold, we take it and delete
it from the array as above.  Thus just random.sample is not enough as
we may not use an element we pick until we find the right one, element
by element, running a cumulative statistics.

Using an array is natural here as it represents "without replacement"
-- we take an element by removing it from the array.  But in Python
it's very slow...  What approaches are there to implement a shrinking
array with random deletions with  the magnitude of millions of
elements?

Cheers,
Alexy
-- 
http://mail.python.org/mailman/listinfo/python-list


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.

regards
  Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

-- 
http://mail.python.org/mailman/listinfo/python-list


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 you I would keep it a secret until a Hollywood producer
>> offers big bucks for the film rights.
>
> Who would play Guido, I wonder?

Ralf Möller.  No other.

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
  Jabber ID: [EMAIL PROTECTED]
   (See http://ime.webhop.org for further contact info.)
-- 
http://mail.python.org/mailman/listinfo/python-list


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 for a while, and then go to bed
>> (it's past 2:30 a.m.) Tomorrow I will contemplate whether to sell this
>> little secret for big bucks, give it away for free, or just keep it to
>> myself... :-)
>>
>> Now you are probably thinking I reinvented the gunpowder, and are
>> running multiple processes. Not so. I am not running parallel
>> processes, like parallel python or the processing module in cheese
>> shop. I am running multiple THREADS. In fact, I am just using
>> threading.Thread. The source code is pure Python, so there is no C
>> magic, and I only used the stuff that's already there in the standard
>> library. So, I just made CPython do what everyone claim to be
>> impossible. One single process of CPython is using all the cpu power
>> of my dual-core laptop.
> 
> 
> 
> If I were you I would keep it a secret until a Hollywood producer
> offers big bucks for the film rights.

Who would play Guido, I wonder?


-- 

Tim Daneliuk [EMAIL PROTECTED]
PGP Key: http://www.tundraware.com/PGP/
-- 
http://mail.python.org/mailman/listinfo/python-list


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 value to be mutable if the
function doesn't modify it, as in the following example:

def parse(text, stopwords=set(w.strip() for w in
  open('stopwords.txt')):
words = [w for w in text.split() if w not in stopwords]
...

Since the set is not modified, there's no harm for being mutable; IOW
it's no different than using a frozenset instead. Similarly for dicts,
lists and other mutable containers, as long as they are treated as
read-only.

George
-- 
http://mail.python.org/mailman/listinfo/python-list


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.py.
My code looks like:

results = p.query('//[EMAIL PROTECTED]"I-57-1r"]'
xc = p.getcontainer()
xm = p.getxmlmanager()
uc = xm.createUpdateContext()
if results.hasNext() is True:
#delete the document!
xc.removeDocument('57-1r', uc)
#add a new document with the same name
xc.putDocument('57-1r' , ', uc)

Put document works fine. I can remove the document using  
removeDocument from the shell, but not from within Python. Help...
Peter Robinson: [EMAIL PROTECTED]
Scholarly Digital Editions
12 The Old Silverworks
54a Spencer Street
Jewellery Quarter
Birmingham B18 6JT
fax: 44 (0) 121 275 6212


-- 
http://mail.python.org/mailman/listinfo/python-list


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 (they're updated everyday).  When I run the script from my
> > command line everything works as intended.  However, when the script
> > is run from crontab every single url that I attempt to open gets
> > "connection refused".  Has anyone ever seen anything like this?  If
> > so, what's causing it, and what can I do about it?
>
> Perhaps you have an http_proxy environment variable set in the
> interactive session but not in cron's environment?
>
Aha! Thanks, I think that that may indeed be the problem.  I'll know
for sure tomorrow morning after I look at the trace of the run.

Victor

> -M-

-- 
http://mail.python.org/mailman/listinfo/python-list


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 example:
| >
| ...
|
| >
| > def meth2(self, arg=meth1()):
|
|Not good.  If the default value of an argument is mutable, there
| are wierd effects, because the default value is bound once when the
| class is created, then shared between all later uses.  This is almost
| never what was wanted or intended, and it's a common source of subtle
| bugs.
|
|In general, default values should be immutable constants only.

Then one would have to restrict default args to immutable builtins.
There is no way to determine (without reading code) whether instances of a 
user-defined class are mutable or not.

tjr



-- 
http://mail.python.org/mailman/listinfo/python-list


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 presume 0 then.
> but it seems the dude is wrong and it is 1?

Define a**b as 1 multiplied by a b times.  Then a**0 is clearly 1, 
regardless of a.

But some do disagree.

| decimal.InvalidOperation: 0 ** 0

I would think of this as a bug unless the standard Decimal follows demands 
this.

tjr



-- 
http://mail.python.org/mailman/listinfo/python-list


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 and imported them into my main program.

There are also several signaling techniques that make it easy to separate
the GUI logic from the message-processing logic. Or you could simply have a
controller class that instantiates the GUI class and registers itself as the
message listener.

Regards,
Ryan Ginstrom

-- 
http://mail.python.org/mailman/listinfo/python-list


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 joined all the other people that just killfile
> everything posted via google.groups.
> 
> AFAICT, if you're a google groups user your posts are not being
> seen by many/most experienced (read "non-google-group") users.
> This is mainly the fault of google who has refused to do
> anything to stem the flood of span that's being sent via Google
> Groups.
> 

How exactly do you killfile an entire source like that? Is it possible 
with Thunderbird?
-- 
http://mail.python.org/mailman/listinfo/python-list


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 code?
|
| are some functions only implementable recursively?

Computers can be viewed as linear iteration machines implementing

while True:
  execute next instruction and set next pointer appropriately

But algorithms most naturally expressed with multiple recursion usually 
look more ungainly when linearized.




-- 
http://mail.python.org/mailman/listinfo/python-list


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 uses metaclasses and descriptors.

I'd also appreciate further feedback if I've done anything stupid or
if there's some interesting approach I've missed that might work
better.

Thanks again,
Andrew
-- 
http://mail.python.org/mailman/listinfo/python-list


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 = [['somestring', 1, 2], ['oneother', 2, 4]]
>
> I want to search "somestring" in someList which is in practice a list
> of aprox. 200 lists. (hey, I'm a newbie python programmer, don't judge
> me).
> is the list.index the wrong approach?
> should I use numpy, numarray, something else?
> can anyone, be kind and help me with this?

someList = [['somestring', 1, 2], ['oneother', 2, 4]]
for alist in someList:
if alist[0] == 'somestring':
print "Found it at index %d" % someList.index( alist )
# if you know it will only occur once you might say:
break

HTH,
Daniel
-- 
http://mail.python.org/mailman/listinfo/python-list


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, I call it processor()). My first
iteration below works perfectly fine- as long as the log file itself
(logfile.log) keeps getting written to.

I have a shell script constantly writes to the logfile.log... If I
happen to kill it off and restart it (overwriting the log file with
more entries) then the python script will stop sending anything at all
out.

import time, os

def processor(message,address):
#do something clever here

#Set the filename and open the file
filename = 'logfile.log'
file = open(filename,'r')

#Find the size of the file and move to the end
st_results = os.stat(filename)
st_size = st_results[6]
file.seek(st_size)

while 1:
where = file.tell()
line = file.readline()
if not line:
time.sleep(1)
file.seek(where)
else:
print line, # already has newline
data = line
if not data:
break
else:
processor(data,addr)
print "Sending message '",data,"'."

someotherstuffhere()

===

This is perfectly normal behavior since the same thing happens when I
do a tail -f on the log file. However, I was hoping to build in a bit
of cleverness in the python script- that it would note that there was
a change in the log file and could compensate for it.

So, I wrote up a new script that opens the file to begin with,
attempts to do a quick file measurement of the file (to see if it's
suddenly stuck) and then reopen the log file if there's something
dodgy going on.

However, it's not quite working the way that I really intended it to.
It will either start reading the file from the beginning (instead of
tailing from the end) or just sit there confuzzled until I kill it
off.

===


import time, os

filename = logfile.log

def processor(message):
# do something clever here

def checkfile(filename):
file = open(filename,'r')
print "checking file, first pass"
pass1 = os.stat(filename)
pass1_size = pass1[6]

time.sleep(5)

print "file check, 2nd pass"
pass2 = os.stat(filename)
pass2_size = pass2[6]
if pass1_size == pass2_size:
print "reopening file"
file.close()
file = open(filename,'r')
else:
print "file is OK"
pass



while 1:
checkfile(filename)
where = file.tell()
line = file.readline()
print "reading file", where
if not line:
print "sleeping here"
time.sleep(5)
print "seeking file here"
file.seek(where)
else:
# print line, # already has newline
data = line
print "readying line"
if not data:
print "no data, breaking here"
break
else:
print "sending line"
processor(data)

So, have any thoughts on how to keep a Python script from bugging out
after a tailed file has been refreshed? I'd love to hear any thoughts
you my have on the matter, even if it's of the 'that's the way things
work' variety.

Cheers, and thanks in advance for any ideas on how to get around the
issue.

tom
-- 
http://mail.python.org/mailman/listinfo/python-list


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 bed
> (it's past 2:30 a.m.) Tomorrow I will contemplate whether to sell this
> little secret for big bucks, give it away for free, or just keep it to
> myself... :-)
>
> Now you are probably thinking I reinvented the gunpowder, and are
> running multiple processes. Not so. I am not running parallel
> processes, like parallel python or the processing module in cheese
> shop. I am running multiple THREADS. In fact, I am just using
> threading.Thread. The source code is pure Python, so there is no C
> magic, and I only used the stuff that's already there in the standard
> library. So, I just made CPython do what everyone claim to be
> impossible. One single process of CPython is using all the cpu power
> of my dual-core laptop.



If I were you I would keep it a secret until a Hollywood producer
offers big bucks for the film rights.
-- 
http://mail.python.org/mailman/listinfo/python-list


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], ['oneother', 2, 4]]

I want to search "somestring" in someList which is in practice a list 
of aprox. 200 lists. (hey, I'm a newbie python programmer, don't judge 
me).
is the list.index the wrong approach?
should I use numpy, numarray, something else?
can anyone, be kind and help me with this? 

-- 
http://mail.python.org/mailman/listinfo/python-list


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 understanding of the MySQLdb interface is that NULL
> database values are returned as a Python 'None' object.
>
> Because I need to create some work fields based on the contents of the
> database I am doing so by copying the tuple to a list object and then
> calculating these work fields as needed.  My problem is that I need to be
> able to detect the Python 'None' objects and convert them to an integer
> zero value field to enable my calculations to work.
>
> I'm new to Python so I'm sure I'm overlooking something simple – but what
> is the easiest way to do a logical test for the existence of a TypeNone
> field?

>>> a = 0
>>> a==None
False
>>> b = None
>>> b==None
True

>>> type(a)

>>> type(b)

-- 
http://mail.python.org/mailman/listinfo/python-list


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 that NULL
> database values are returned as a Python 'None' object.
> 
> Because I need to create some work fields based on the contents of the
> database I am doing so by copying the tuple to a list object and then
> calculating these work fields as needed.  My problem is that I need to be
> able to detect the Python 'None' objects and convert them to an integer
> zero value field to enable my calculations to work.
> 
> I'm new to Python so I'm sure I'm overlooking something simple – but what
> is the easiest way to do a logical test for the existence of a TypeNone
> field?

Since there is only one instance of TypeNone (the value we reference as 
None) the easiest test is

   if x is None:

There is no need to create a list first: you can create a list as you 
iterate over the tuple:

a = (1, 2, None, "a", "b")
a = [0 if x is None else x for x in a]

regards
  Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

-- 
http://mail.python.org/mailman/listinfo/python-list

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 :
   ...

- Original Message 
From: python newbie <[EMAIL PROTECTED]>
To: python-list@python.org
Sent: Wednesday, April 16, 2008 8:58:10 PM
Subject: Logical Operator and code block not executing (newbie  question)

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 (tries < total_attempts):

print "You guessed it! The number was", the_number
print "And it only took you", tries, "tries!\n"
print "The  correct answer is: ", the_number

Below is the complete script:
#! /usr/bin/python
# Aurthor: Me
# Purpose: Demonstrates
# Date: April 15, 2008

import random

print "\tWelcome to 'Guess My Number'!"
print "\nI'm thinking of a number between 1 and 100."
print "Try to guess it in as few attempts as possible.\n"

# set the initial values
the_number = random.randrange(100) + 1
guess = int(raw_input("Take a guess: "))
tries = 1
total_attempts = 3

# guessing loop
while (guess != the_number): 
if (guess > the_number) and (tries < total_attempts):
print "Lower..."
print "You have...", total_attempts - tries, "left."
print "The  correct answer is: ", the_number
elif (guess < the_number) and (tries < total_attempts):
print "Higher..."
print "You have...", total_attempts - tries, "left."
print "The  correct answer is: ", the_number
elif (guess == the_number) and (tries < total_attempts):
print "You guessed it! The number was", the_number
print "And it only took you", tries, "tries!\n"
print "The  correct answer is: ", the_number
elif (tries >= total_attempts):
print "You're out of guess"
print "You have...", total_attempts - tries, "left."
print "You need more practice."
print "The  correct answer is: ", the_number
break
else: 
print "You shouldn't see this message..."
print "You have...", total_attempts - tries, "left."
print "The  correct answer is: ", the_number
break
guess = int(raw_input("Take a guess: "))
tries += 1


raw_input("\n\nPress the enter key to exit.")

PS: I am new to coding & scripting.

Pete

 



  
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.




  Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try 
it now.





  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ-- 
http://mail.python.org/mailman/listinfo/python-list

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 head screwed on right hand code a UI.
There are graphical UI designers for that - QtDesigner, Glade,
wxFormBuilder. Notice how the VB, Delphi and .NET crowds are doing the
same.
-- 
http://mail.python.org/mailman/listinfo/python-list


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 (tries < total_attempts):

print "You guessed it! The number was", the_number
print "And it only took you", tries, "tries!\n"
print "The  correct answer is: ", the_number

Below is the complete script:
#! /usr/bin/python
# Aurthor: Me
# Purpose: Demonstrates
# Date: April 15, 2008

import random

print "\tWelcome to 'Guess My Number'!"
print "\nI'm thinking of a number between 1 and 100."
print "Try to guess it in as few attempts as possible.\n"

# set the initial values
the_number = random.randrange(100) + 1
guess = int(raw_input("Take a guess: "))
tries = 1
total_attempts = 3

# guessing loop
while (guess != the_number): 
if (guess > the_number) and (tries < total_attempts):
print "Lower..."
print "You have...", total_attempts - tries, "left."
print "The  correct answer is: ", the_number
elif (guess < the_number) and (tries < total_attempts):
print "Higher..."
print "You have...", total_attempts - tries, "left."
print "The  correct answer is: ", the_number
elif (guess == the_number) and (tries < total_attempts):
print "You guessed it! The number was", the_number
print "And it only took you", tries, "tries!\n"
print "The  correct answer is: ", the_number
elif (tries >= total_attempts):
print "You're out of guess"
print "You have...", total_attempts - tries, "left."
print "You need more practice."
print "The  correct answer is: ", the_number
break
else: 
print "You shouldn't see this message..."
print "You have...", total_attempts - tries, "left."
print "The  correct answer is: ", the_number
break
guess = int(raw_input("Take a guess: "))
tries += 1


raw_input("\n\nPress the enter key to exit.")

PS: I am new to coding & scripting.

Pete


   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.-- 
http://mail.python.org/mailman/listinfo/python-list

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 past 2:30 a.m.) Tomorrow I will contemplate whether to sell this
little secret for big bucks, give it away for free, or just keep it to
myself... :-)

Now you are probably thinking I reinvented the gunpowder, and are
running multiple processes. Not so. I am not running parallel
processes, like parallel python or the processing module in cheese
shop. I am running multiple THREADS. In fact, I am just using
threading.Thread. The source code is pure Python, so there is no C
magic, and I only used the stuff that's already there in the standard
library. So, I just made CPython do what everyone claim to be
impossible. One single process of CPython is using all the cpu power
of my dual-core laptop.





-- 
http://mail.python.org/mailman/listinfo/python-list


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 are returned as a Python 'None' object.

Because I need to create some work fields based on the contents of the
database I am doing so by copying the tuple to a list object and then
calculating these work fields as needed.  My problem is that I need to be
able to detect the Python 'None' objects and convert them to an integer
zero value field to enable my calculations to work.

I'm new to Python so I'm sure I'm overlooking something simple – but what
is the easiest way to do a logical test for the existence of a TypeNone
field?
-- 
http://mail.python.org/mailman/listinfo/python-list

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 loyalty only goes to far. This is a
> > complete lack of customer service.
>
> > Mike
>
> Bless you.  I just installed Greasemonkey and the Google Groups
> Killfile.  Works like a charm.

I manually edit the REs in the GGK's kill file variable (use Firefox
about:config and filter for "kill") and enable case-insensitive search
(open the script, search for "compile()" and add a second parameter
"i").

(Posted via GG, but I'm open to an alternative web-based Usenet
service.)

--
Kam-Hung Soh http://kamhungsoh.com/blog";>Software Salariman
-- 
http://mail.python.org/mailman/listinfo/python-list


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>, and that
> works very well.
> 
>> This official python list is one of the few lists that's even still on
>> nntp.  All my other ones (gnome, gtk, openldap, clamav, freeradius, etc)
>> are all e-mail mailing lists only and it works very well.  In fact, I
>> think it's much better since list subscription can actually be
>> controlled by someone.
> 
> Most technical mailing lists are accessible via NNTP on gmane.org. It
> works very well.
> 
> Other discussion groups remain on Usenet, accessible via NNTP from
> servers around the world that mirror each group. In fact, I think it's
> much better since I can use any one of those servers, and the content
> isn't locked up in one specific server.
> 
The duff thung about mailing lists is the way they fill your mailbox up 
when you don't have time for them. Hundreds of unread messages all 
screaming for your attention.

When c.l.py drops too far down the priority list I just stop reading it. 
  Messages float by, expire and drop off the list without any action 
from me.

regards
  Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

-- 
http://mail.python.org/mailman/listinfo/python-list


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 environment, but in real life, that's sometimes 
difficult to achieve.
-- 
http://mail.python.org/mailman/listinfo/python-list


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/mailman/listinfo/python-list


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 probably continue my work on that.

Cheers,
T

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 are released)
> * June 21st-22nd (~week before 2.6b2 and 3.0b2 are released)
>
> It seems there are a few of the Python User Groups keen on meeting
> up in person and sprinting collaboratively, akin to PyCon, which I
> highly recommend.  I'd like to nominate Saturday across the board
> as the day for PUGs to meet up in person, with Sunday geared more
> towards an online collaboration day via IRC, where we can take care
> of all the little things that got in our way of coding on Saturday
> (like finalising/preparing/reviewing patches, updating tracker and
> documentation, writing tests ;-).
>
> For User Groups that are planning on meeting up to collaborate,
> please reply to this thread on [EMAIL PROTECTED] and let every-
> one know your intentions!
>
> As is commonly the case, #python-dev on irc.freenode.net will be
> the place to be over the course of each sprint weekend; a large
> proportion of Python developers with commit access will be present,
> increasing the amount of eyes available to review and apply patches.
>
> For those that have an idea on areas they'd like to sprint on and
> want to look for other developers to rope in (or just to communicate
> plans in advance), please also feel free to jump on this thread via
> python-dev@ and indicate your intentions.
>
> For those that haven't the foggiest on what to work on, but would
> like to contribute, the bugs tracker at http://bugs.python.org is
> the best place to start.  Register an account and start searching
> for issues that you'd be able to lend a hand with.
>
> All contributors that submit code patches or documentation updates
> will typically get listed in Misc/ACKS.txt; come September when the
> final release of 2.6 and 3.0 come about, you'll be able to point at
> the tarball or .msi and exclaim loudly ``I helped build that!'',
> and actually back it up with hard evidence ;-)
>
> Bring on the pizza and Red Bull!
>
> Trent.
> ___
> Python-Dev mailing list
> [EMAIL PROTECTED]
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-dev/krumms%40gmail.com
>   

-- 
http://mail.python.org/mailman/listinfo/python-list


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 the
> sequence types (multiplicative, cumulative, gauss ...), but first I
> need the simple SEQA( ) function to be more robust.   The problem is
> the three test code functions produces different results based on
> step. I understand why steps such as 0.1 have rounding and  machine
> math issues, and before I try to solve this I thought it was worth
> asking if this problem has been solved (so I do not re-invent the
> wheel).

Using numpy.arange() with floats is known to be problematic, and it is 
discouraged. Almost all of the use cases are better served with 
numpy.linspace() 
which accepts a start, end, and the number of points rather than a step.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

-- 
http://mail.python.org/mailman/listinfo/python-list


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 append to the existing meta_path, not replace it, erasing any  
previous content.
And it must be an *instance* of your importer, not the type itself.
Note that you're polluting the __main__ module namespace by using  
PyRun_SimpleString; I'd use API calls like PySys_GetObject("meta_path")  
and PyList_Append (PEP 302 guarantees it is a list).

> "sys.meta_path.append(Importer)\n";

Here you append to sys.meta_path, but fail to create the instance first.

> PyRun_SimpleString(importer_source);

You should check the return value; I bet you got a -1 (failure).

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list


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 doesnt say what it is but i presume 0 then.
> >> but it seems the dude is wrong and it is 1?
>
> > Of the possible results of 0 ** 0 (i.e. 1, 0, and NaN), 1 seems to be
> > the least implausible. It allows X ** 0 to be 1 for all X.
>
> But a result of 0 would allow 0 ** X to be 0 for all X. (btw, this is the  
> reason lim(x**x) for x->0 does not exist)

Where this has come up in my research, X**0 being a multiplicative
identity is far more important than 0**X being an additive identity.


>
> --
> Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list


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 is 1?
>
> Of the possible results of 0 ** 0 (i.e. 1, 0, and NaN), 1 seems to be
> the least implausible. It allows X ** 0 to be 1 for all X.

But a result of 0 would allow 0 ** X to be 0 for all X. (btw, this is the  
reason lim(x**x) for x->0 does not exist)

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list


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.
> > "they only work correctly when run in a specific sequence") means
> > you're not isolating them properly.
> 
> So a mode to randomise the test sequence would be nice to have.

Twisted has a "trial" framework that allows just such a mode
http://buildbot.net/repos/release/docs/reference/buildbot.steps.python_twisted.Trial-class.html>.

> Unittest's behaviour (using alphabetical order) doesn't really help
> to detect undesired dependencies (which might be bugs in the test
> suite or bugs in the underlying code).

Agreed. It's just a matter of making a custom unittest.TestRunner,
though. Yes, a Small Matter of Programming which I haven't actually
done, but unittest doesn't make it difficult to do that.

> But running tests in the order they appear is often helpful: you can
> put the tests for basic stuff before the tests for advanced stuff,
> and then if you suddenly get seventeen failing tests, you know that
> the first failure is the best bet to investigate first.

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.

-- 
 \ "I planted some bird seed. A bird came up. Now I don't know |
  `\   what to feed it."  -- Steven Wright |
_o__)  |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list


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 would
> work. Could give an example? Say, for example, the typical: walking
> through the file system hierarchy (without using os.walk(), which uses
> recursion anyway!).

Use a queue of pending directories to visit:

start with empty queue
queue.put(starting dir)
while queue is not empty:
   dir = queue.get()
   list names in dir
   for each name:
 if is subdirectory: queue.put(name)
 else: process file

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list


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*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 but i presume 0 then.
> but it seems the dude is wrong and it is 1?

Of the possible results of 0 ** 0 (i.e. 1, 0, and NaN), 1 seems to be 
the least implausible. It allows X ** 0 to be 1 for all X.

> 
> dont run the code with decimals, it will never leave the function, u
> have to restart the shell(if using the standard python ide)

I presume that by "decimals", you mean "numbers that are not integers".

So you've got it into an infinite loop. Have you tried tracing through 
the first 5 or 6 gyrations? This can be done by
(a) putting a debugger breakpoint just after the start of the function
(b) using something like:
 print "power(%.6f, %.6f)" % (nbr, po))
 junk = raw_input("Press  to continue -> ")
(c) using a pencil and a piece of scrap paper, write down what is 
happening as a typical function call is executed e.g.

power(5, 1.3) => 5 * power(5, 0.3)
power(5, 0.3) => 5 * power(5, -0.7)
power(5, -0.7) => 1 / power (5, 0.7)
etc

Then work out what extra condition you would have to test to stop it 
doing that. Then work out how to calculate the return value when that 
condition is true.

HTH,
John

-- 
http://mail.python.org/mailman/listinfo/python-list


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.

> This official python list is one of the few lists that's even still on
> nntp.  All my other ones (gnome, gtk, openldap, clamav, freeradius, etc)
> are all e-mail mailing lists only and it works very well.  In fact, I
> think it's much better since list subscription can actually be
> controlled by someone.

Most technical mailing lists are accessible via NNTP on gmane.org. It
works very well.

Other discussion groups remain on Usenet, accessible via NNTP from
servers around the world that mirror each group. In fact, I think it's
much better since I can use any one of those servers, and the content
isn't locked up in one specific server.

-- 
 \ "I'm beginning to think that life is just one long Yoko Ono |
  `\   album; no rhyme or reason, just a lot of incoherent shrieks and |
_o__)   then it's over."  -- Ian Wolff |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list


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 stdout, I  
> would love to return them back to the program itself and store them in  
> an object.  How would I do this?

Replace sys.stdout with an object that stores the lines printed. (Due to  
the way the print statement works, you should not inherit from file)

class PrintBuffer:
 def __init__(self, stream):
 self._stream = stream
 self.output = []
 def write(self, text):
 self.output.append(text)
 self._stream.write(text)
 def __getattr__(self, name):
 return getattr(self._stream, name)

py> import sys
py> sys.stdout = PrintBuffer(sys.stdout)
py> print "Hello world!"
Hello world!
py> print 2,"*",3,"=",2*3
2 * 3 = 6
py> print >>sys.stderr, sys.stdout.output
['Hello world!', '\n', '2', ' ', '*', ' ', '3', ' ', '=', ' ', '6', '\n']
py>

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list


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 actually were I learned to program too! Excellent
tutorial. But don't read the JavaScript or VBScript stuff. The only
thing it gave me trouble learning from that tutorial was OOP (Object
Oriented Programming), but that's a bit advanced for a newcomer
anyway...
-- 
http://mail.python.org/mailman/listinfo/python-list


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 class to new-style class
> > transition?
>
> I'd ignore it.  I never understood it and never had
> any need for it anyway.  New-style classes and metaclasses
> were a complicated solution to an unimportant problem in
> my opinion.  And also a fiendish way to make code
> inscrutible -- which I thought was more of a Perl thing
> than a Python thing, or should be.
>
> I must be missing some of the deeper issues here.  Please
> educate me.

The deeper issue is that you're benefiting from these "unimportant"
changes even if you never use them yourself.


Carl Banks
-- 
http://mail.python.org/mailman/listinfo/python-list


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 break the pre-existing code base again for a
> > very long time, preferable ever.
> 
> I'm pretty sure the 3.0 compatibility breakage is a one-shot deal. If 
> it's not I won't be the only one looking for Guido with a bog stick in 
> my hand ...

Depending on what you mean, that appears to be either a
truism or an absurdity.  If you mean, 3.1 won't break
code like 3.0 did ... well, of course.  If you mean, there
won't be a 4.0 that means the same thing for compatibility
that 3.0 means, then I can't imagine how you could be
convinced of this.  Changes to Python in 3.0 won't satisfy
the continuing "need" for change thereafter.

   Donn Cave, [EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list


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 function equally well when executed in any
> arbitrary sequence. Dependencies between separate test cases (e.g.
> "they only work correctly when run in a specific sequence") means
> you're not isolating them properly.


So a mode to randomise the test sequence would be nice to have.

Unittest's behaviour (using alphabetical order) doesn't really help to
detect undesired dependencies (which might be bugs in the test suite or
bugs in the underlying code).

But running tests in the order they appear is often helpful: you can
put the tests for basic stuff before the tests for advanced stuff, and
then if you suddenly get seventeen failing tests, you know that the
first failure is the best bet to investigate first.

-M-

-- 
http://mail.python.org/mailman/listinfo/python-list


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: vary number of loops
>
> > > If n=3, I want to have 3 sets of elements and mix them up using 3
> for
> > > loops.
>
> > You might be ineterested in this thread:
>
> >http://mail.python.org/pipermail/python-list/2008-January/473650.html
>
> > where various solutions were proposed and their various merits
> > evaluated.
>
> I second that.  The thread compared building loops on the fly, building
> comprehensions nested to arbitrarily levels, recursion (slw!), a
> slick cookbook recipe using iterators, etc. and provided timings for
> each method.  Definitely worth bookmarking.
>


Yes, I second that second :) Very nice thread, I'm leaning toward the
"pythonic method" from there, but thanks for all the other solutions
suggested here. Guess I need to go play with lambda more...

nullgraph
-- 
http://mail.python.org/mailman/listinfo/python-list


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 to the user group and 
applied as member but I haven't been approved yet so I can't download the file 
you mentioned on the thread in showmedo.

Can you help me out?

Thanks
-- 
http://mail.python.org/mailman/listinfo/python-list

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 that frustrated
> programmers will decide that "using something other
> than python" is a "better coding practice".  I've seen
> it happen.

So the average quality of Python coders raises.  Cool.  ;-)

Ciao,
Marc 'BlackJack' Rintsch
-- 
http://mail.python.org/mailman/listinfo/python-list


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 existing code base, mostly.
> For example the minor changes to the way ints will work will
> effect almost no programs.
> 
> I don't see the urgency to clean up what are essentially
> cosmetic issues and throw out or
> require rewrites for just about all existing Python
> code. Python 2.6 isn't fundamentally awful like Perl 4 was.
> 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 break the pre-existing code base again for a
> very long time, preferable ever.

I'm pretty sure the 3.0 compatibility breakage is a one-shot deal. If 
it's not I won't be the only one looking for Guido with a bog stick in 
my hand ...

regards
  Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/
-- 
http://mail.python.org/mailman/listinfo/python-list


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 typical: walking
through the file system hierarchy (without using os.walk(), which uses
recursion anyway!).
-- 
http://mail.python.org/mailman/listinfo/python-list


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('\\','/')
> while clean.find('//') != -1:
> clean = clean.replace('//','/')
>
> print 'cleaned on init:\t',clean
> self = clean
>
> so clearly the clean variable is what I want value of the string to
> be, but that’s decidedly not the case.  so running this:
>
> a=Path('path///with\\nasty/crap_in_it/')
> print a
>
> gives me this:
>
> cleaned on init:  path/with/nasty/crap_in_it/
> path///with\nasty/crap_in_it/
>
> what gives?  what am I doing wrong, and can I do what I’m trying to
> here?
> thanks.

Regardless of the problem you have initializing the class, why do you
need to inherit from str? Actually, why do you even need a class?
Unless you're dealing something more complex that you didn't mention
here, that should be just a simple function.
-- 
http://mail.python.org/mailman/listinfo/python-list


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.1032829834638136
>>> 0**0
1
>>> 0.**0.
1.0
>>> from decimal import Decimal
>>> Decimal(0)**Decimal(0)
Traceback (most recent call last):
  File "", line 1, in 
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/decimal.py", line 1755, in __pow__
return context._raise_error(InvalidOperation, '0 ** 0')
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/decimal.py", line 2325, in _raise_error
raise error, explanation
decimal.InvalidOperation: 0 ** 0

Most mathematicians consider 0**0 to be either 1 or undefined.  Which
answer you get depends on who you ask (or in Python, whether you're
working with floats or Decimals, as you see above).

Mark
-- 
http://mail.python.org/mailman/listinfo/python-list


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 code?
>
>are some functions only implementable recursively?
>

Function calls (recursive or otherwise) are more expensive than
for loops, so the version that replaces recursion with a loop is
faster.

Any function can be implemented without recursion, although it isn't
always easy or fun.

Jean-Paul
-- 
http://mail.python.org/mailman/listinfo/python-list


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
> about the latest ding dong and the next is a response to a post from
> last week.

Using a good client like Thunderbird, and e-mails thread just fine.
Nesting as deep as need be.  On my client (I use thunderbird for
everything), it looks the same whether I use NNTP or mailing lists.
It's all good.

As for filling up your inbox, that never happens to me.  My inbox gets
maybe 1 new message a day.  Everything else is automatically filed
into the right folder, just like how NNTP shows you individual groups.
 Gmail makes this very easy to do with their filters.  For others
there is procmail.  Honestly a few minutes of work is very much worth
it.  For those that want to keep using nntp and put up with the spam
(no server-side spam processing there), that's great, though.

Finally as for threading being difficult, yes it is if you use GMail's
web client.  "Conversations" are *not* threads, sadly.  It's a broken
interface that's becoming popular unfortunately.  I've always hated
web forums for the same reasons.  Conversations also don't deal very
well with changes in the subject line that reflect new directions or
forks in the current topic.

> But I agree...there are other alternatives. I'll have to start trying
> them again I suppose.

If I have to, I guess.  :)
-- 
http://mail.python.org/mailman/listinfo/python-list


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 but i presume 0 then.
but it seems the dude is wrong and it is 1?


dont run the code with decimals, it will never leave the function, u
have to restart the shell(if using the standard python ide)
-- 
http://mail.python.org/mailman/listinfo/python-list


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, po):
if po==0:
return 1
if po>0:
return nbr*power(nbr, po-1)
if po<0:
return 1/power(nbr, -1*po)

109992 function calls (10002 primitive calls) in 0.409 CPU seconds

   Ordered by: standard name

   ncalls  tottime  percall  cumtime  percall
filename:lineno(function)
10.0150.0150.4090.409 :1(test1)
10.0000.0000.4090.409 :1()
109989/0.3940.0000.3940.000 myMath.py:39(power)
10.0000.0000.0000.000 {method 'disable' of
'_lsprof.Profiler' objects}



def power2(nbr, po):
acc=1
if po >= 1:
acc=nbr
for x in range(1, po):
acc=acc*nbr
if po < 0:
if nbr!=0:
acc=1
for x in range(0, po, -1):
acc=acc/nbr
else:
return "Division by zero"
return acc


20001 function calls in 0.095 CPU seconds

   Ordered by: standard name

   ncalls  tottime  percall  cumtime  percall
filename:lineno(function)
10.0260.0260.0950.095 :1(test1)
10.0000.0000.0950.095 :1()
 0.0510.0000.0690.000 myMath.py:47(power2)
10.0000.0000.0000.000 {method 'disable' of
'_lsprof.Profiler' objects}
 0.0170.0000.0170.000 {range}
-- 
http://mail.python.org/mailman/listinfo/python-list


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 default value of an argument is mutable, there
are wierd effects, because the default value is bound once when the
class is created, then shared between all later uses.  This is almost
never what was wanted or intended, and it's a common source of subtle
bugs.

In general, default values should be immutable constants only.
There's been talk of fixing this (it's really a design bug in Python),
but for now, it's still broken.

(I just had horrible thoughts about the implications of binding
a closure to a default argument.  You don't want to go there.)

John Nagle
-- 
http://mail.python.org/mailman/listinfo/python-list


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 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 joined all the other people
> >>> that just killfile everything posted via google.groups.
> >> Not very bright, eh?
>
> >>> AFAICT, if you're a google groups user your posts are not being
> >>> seen by many/most experienced (read "non-google-group") users.
> >>> This is mainly the fault of google who has refused to do
> >>> anything to stem the flood of span that's being sent via Google
> >>> Groups.
> >> Duh.
>
> > My.  That was certainly a well-reasoned and well-written
> > response.
>
> Well, it did come from an AOL user posting from Google groups .

Hey, he wasn't supposed to see that! He's plonked Google Groups,
hasn't he?

Looks like you'll have to reconsider how well-reasoned
AOL users are. Who use Google because AOL terminated their
news service - because of Google. Smart move, eh?

-- 
http://mail.python.org/mailman/listinfo/python-list


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,
Martin
-- 
http://mail.python.org/mailman/listinfo/python-list


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 MT-NewsWatcher, a freeware Mac newsreader 
that performs Bayesian spam filtering.  Thunderbird's Usenet reader also 
offers Bayesian filtering, which presumably works just as well for 
classifying Usenet spam as it does at handling email spam.

So download a "real" NNTP client for whatever platform you're on and 
give its spam filter a shot; clearly Google is not interested in 
fighting spam itself.

-- 
Mark Shroyer
http://markshroyer.com/contact/
-- 
http://mail.python.org/mailman/listinfo/python-list

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 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.

What changes are minor though?  Eliminating old-style classes should
be minor, but I'm not sure it is.  Applications & libraries have a way
of depending on the most obscure details - even if trivially fixed, it
still requires a fix.  Consider "as" becoming a keyword, or True and
False.

In hindsight, it would have been better to add future imports for
unicode literals and print-as-a-function back in 2.5.  I guess the
time machine was out of service.  2.6 will have to do (and that's what
it's for.)

I'm personally not too worried about the syntax changes though,
they're superficial(!).  What I am worried about is the library APIs
changing to use unicode instead of bytes.  It's not something you
could do incrementally without providing two of every lib or two of
every API - having .write() and .writeex() would suck.
-- 
http://mail.python.org/mailman/listinfo/python-list


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 with ints are the only
thing I'm really concerned about breaking in 3.0, both because they're
more likely to slip by without being immediately noticed and because
they're likely to be foreign going forward for people used to C-style
integer division (ie most of the programmers in our office).  Even
them I don't see as a huge roadblock, but a "erase old ways of
thinking" bugaboo for a while.

But the rest of the changes are pretty obvious and well warned about
by 2to3 and the interpreter.
-- 
http://mail.python.org/mailman/listinfo/python-list


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 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 that frustrated
programmers will decide that "using something other
than python" is a "better coding practice".  I've seen
it happen.

  -- Aaron Watters

===
http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=alien

-- 
http://mail.python.org/mailman/listinfo/python-list


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. For example:
>> > 
>> > class A:
>> > def __init__(self):
>> > self.x = 1
>> > 
>> > def meth1(self):
>> > return self.x
>> > 
>> > def meth2(self, arg=meth1()):
>> > # The default `arg' should would take the return value of
>> > meth1()
>> > print '"arg" is', arg
>> > 
>> > This obviously doesn't work. I know I could do
>> > 
>> > ...
>> > def meth2(self, arg=None):
>> > if arg is None:
>> > arg = self.meth1()
>> > 
>> > but I'm looking for a more straightforward way.
>> 
>> You can write this as:
>> 
>>  def meth2(self, arg=None):
>>  arg = arg or self.meth1()
>> 
>> IMHO - You can't get much more "straightforward" than that.
> 
> What if arg is 0 an empty list or anything else that's "False"?
> 
> def meth2(self, arg=None):
> arg = (arg is not None) or self.meth1()
> 
> is what you want.

No, it's not:

>>> for arg in None, 0, "yadda":
... print "---", arg, "---"
... if arg is None: arg = "call method"
... print "OP:", arg
... print "Larry:", arg or "call method"
... print "Cliff:", (arg is not None) or "call method"
...
--- None ---
OP: call method
Larry: call method
Cliff: True
--- 0 ---
OP: 0
Larry: call method
Cliff: True
--- yadda ---
OP: yadda
Larry: yadda
Cliff: True

Peter

-- 
http://mail.python.org/mailman/listinfo/python-list


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.  How would 
I do this?

-M

_
Use video conversation to talk face-to-face with Windows Live Messenger.
http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_Refresh_messenger_video_042008-- 
http://mail.python.org/mailman/listinfo/python-list

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 bit mythological anyway -- many new python versions
>> > have broken my old code for no good reason.  This is an irritant
>> > when you have thousands of users out there who suddenly drop
>> > your code, blame you and python, and move on to use something else.
> Yes I mean it.  Actually I was unaware
> of/forgot reconvert, but it doesn't
> matter because it doesn't solve the problem of code I wrote that
> has long ago escaped into the wild no longer working.  There are
> other examples too, having to do with things as simple as a name
> change in a standard module that broke old
> code of mine for what I regard as silly cosmetic reasons.

Yes, there was some cases like that in the past, but I think that now  
there is a strict policy for backwards compatibility, including at least  
one .n release with deprecation warnings before removing old things.  
Anyway, sometimes incompatible changes appear in the standard library -  
perhaps because less developers are looking at them in detail?

> I hope you are right about py3k conversions being pain
> free and routine.  I'm suspicious about it however.

Well, I would not say "pain free", but certainly it's not as terrible as  
some people imply...

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list


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 initializing it.  In python, those are two separate steps.
Creation of an instance is handled by the class's __new__ method, and
initialization is handled by __init__.  This makes a big difference
when you inherit from an immutable type like str.

Try something like this instead:

class Path(str):
def __new__( cls, path ):
clean = str(path).replace('\\','/')
while clean.find('//') != -1:
clean = clean.replace('//','/')
print 'cleaned on __new__:\t',clean
return str.__new__(cls, clean)


-- 
Jerry
-- 
http://mail.python.org/mailman/listinfo/python-list


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:
> > 
> > class A:
> > def __init__(self):
> > self.x = 1
> > 
> > def meth1(self):
> > return self.x
> > 
> > def meth2(self, arg=meth1()):
> > # The default `arg' should would take the return value of
> > meth1()
> > print '"arg" is', arg
> > 
> > This obviously doesn't work. I know I could do
> > 
> > ...
> > def meth2(self, arg=None):
> > if arg is None:
> > arg = self.meth1()
> > 
> > but I'm looking for a more straightforward way.
> 
> You can write this as:
> 
>  def meth2(self, arg=None):
>  arg = arg or self.meth1()
> 
> IMHO - You can't get much more "straightforward" than that.

What if arg is 0 an empty list or anything else that's "False"?

def meth2(self, arg=None):
arg = (arg is not None) or self.meth1()

is what you want.


Regards,
Cliff


-- 
http://mail.python.org/mailman/listinfo/python-list


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 rearrange the loops so the outer one executes
>  > less times; if you know that borderX<  > better to swap the inner and outer loops above.
>  > Thank you for the tip on xrange.
>  > Even if I swap the inner and outer loops, I would still be doing the same
>  > number of computations, am I right (since I still need to go through the
>  > same number of elements)? I'm not seeing how a loop swap would lead to
>  > fewer
>  > computations, since I still need to calculate the outer rim of elements
>  > in
>  > the array (defined by borderX and borderY).
>
>  You minimize the number of "for" statements executed, and the number of
>  xrange objects created. Both take some time in Python.
>
>  
>  import timeit
>
>  f1 = """
>  for i in xrange(10):
>for j in xrange(1000):
>  i,j
>  """
>
>  f2 = """
>  for j in xrange(1000):
>for i in xrange(10):
>  i,j
>  """
>
>  print timeit.Timer(f1).repeat(number=1000)
>  print timeit.Timer(f2).repeat(number=1000)
>  
>
>  Output:
>  [2.0405478908632233, 2.041863979919242, 2.0397852240997167]
>  [2.8623411634718821, 2.8330055914927783, 2.8361752680857535]
>
>  The second (using the largest outer loop) is almost 40% slower than the
>  first one. "Simplified" Big-Oh complexity analysis isn't enough in cases
>  like this.
>
>  --
>  Gabriel Genellina
>
>  --
>  http://mail.python.org/mailman/listinfo/python-list
>

For large multidimensional arrays you may also see speed differences
depending on traversal order due to cache effects.  For instance, if
the arrays are stored row-major, then processing an array a row at a
time means you're getting a bunch of memory accesses contiguous in
memory (so the cache loading a line at a time means you'll have
several hits per one load), while accessing it by column means you'll
probably have  to go out to memory a lot (depending on whether the
hardware has a prefetcher or how good it is, I suppose).

Just something to consider.
-- 
http://mail.python.org/mailman/listinfo/python-list


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.find('//') != -1:

clean = clean.replace('//','/')

 

print 'cleaned on init:\t',clean

self = clean

 

 

so clearly the clean variable is what I want value of the string to be,
but that's decidedly not the case.  so running this:

 

a=Path('path///with\\nasty/crap_in_it/')

print a

 

 

gives me this:

 

cleaned on init:  path/with/nasty/crap_in_it/

path///with\nasty/crap_in_it/

 

 

what gives?  what am I doing wrong, and can I do what I'm trying to
here?

thanks.

-- 
http://mail.python.org/mailman/listinfo/python-list

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 example the minor changes to the way ints will work will
effect almost no programs.

I don't see the urgency to clean up what are essentially
cosmetic issues and throw out or
require rewrites for just about all existing Python
code. Python 2.6 isn't fundamentally awful like Perl 4 was.
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 break the pre-existing code base again for a
very long time, preferable ever.
  -- Aaron Watters

===
http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=whack
-- 
http://mail.python.org/mailman/listinfo/python-list


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 the inner and outer loops above.
> Thank you for the tip on xrange.
> Even if I swap the inner and outer loops, I would still be doing the same
> number of computations, am I right (since I still need to go through the
> same number of elements)? I'm not seeing how a loop swap would lead to  
> fewer
> computations, since I still need to calculate the outer rim of elements  
> in
> the array (defined by borderX and borderY).

You minimize the number of "for" statements executed, and the number of  
xrange objects created. Both take some time in Python.


import timeit

f1 = """
for i in xrange(10):
   for j in xrange(1000):
 i,j
"""

f2 = """
for j in xrange(1000):
   for i in xrange(10):
 i,j
"""

print timeit.Timer(f1).repeat(number=1000)
print timeit.Timer(f2).repeat(number=1000)


Output:
[2.0405478908632233, 2.041863979919242, 2.0397852240997167]
[2.8623411634718821, 2.8330055914927783, 2.8361752680857535]

The second (using the largest outer loop) is almost 40% slower than the  
first one. "Simplified" Big-Oh complexity analysis isn't enough in cases  
like this.

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list


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 meth1(self):
> return self.x
> 
> def meth2(self, arg=meth1()):
> # The default `arg' should would take the return value of
> meth1()
> print '"arg" is', arg
> 
> This obviously doesn't work. I know I could do
> 
> ...
> def meth2(self, arg=None):
> if arg is None:
> arg = self.meth1()
> 
> but I'm looking for a more straightforward way.

You can write this as:

 def meth2(self, arg=None):
 arg = arg or self.meth1()

IMHO - You can't get much more "straightforward" than that.

-Larry
-- 
http://mail.python.org/mailman/listinfo/python-list


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('//') != -1:
clean = clean.replace('//','/')

print 'cleaned on init:\t',clean
self = clean


so clearly the clean variable is what I want value of the string to
be, but that’s decidedly not the case.  so running this:

a=Path('path///with\\nasty/crap_in_it/')
print a


gives me this:

cleaned on init:  path/with/nasty/crap_in_it/
path///with\nasty/crap_in_it/


what gives?  what am I doing wrong, and can I do what I’m trying to
here?
thanks.
-- 
http://mail.python.org/mailman/listinfo/python-list


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 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 joined all the other people
>>> that just killfile everything posted via google.groups.
>> Not very bright, eh?
>>
>>> AFAICT, if you're a google groups user your posts are not being
>>> seen by many/most experienced (read "non-google-group") users.
>>> This is mainly the fault of google who has refused to do
>>> anything to stem the flood of span that's being sent via Google
>>> Groups.
>> Duh.
> 
> My.  That was certainly a well-reasoned and well-written
> response.

Well, it did come from an AOL user posting from Google groups .
-- 
http://mail.python.org/mailman/listinfo/python-list


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:
> 
> self.address = 'your address'
> self.status = 'single'
> 
> The problem is 'self' is giving some error here. I need to know if
> somehow I can do this. It's like inserting the script as it's part of
> the file itself.
> 
> Cheers
> 

Can you give a use case for doing this.  You would most likely be better doing:

class person(object):
 def __init__(self, name=None, age=None):
 self.name=name
 self.age=age


personInstance=person(name='jack', age='50)

-Larry
-- 
http://mail.python.org/mailman/listinfo/python-list


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 are released)
> * June 21st-22nd (~week before 2.6b2 and 3.0b2 are released)
>
> It seems there are a few of the Python User Groups keen on meeting
> up in person and sprinting collaboratively, akin to PyCon, which I
> highly recommend.  I'd like to nominate Saturday across the board
> as the day for PUGs to meet up in person, with Sunday geared more
> towards an online collaboration day via IRC, where we can take care
> of all the little things that got in our way of coding on Saturday
> (like finalising/preparing/reviewing patches, updating tracker and
> documentation, writing tests ;-).
>
> For User Groups that are planning on meeting up to collaborate,
> please reply to this thread on [EMAIL PROTECTED] and let every-
> one know your intentions!
>
>   

I should be able to help organise and attend the London contribution. 
Personally I'd like to work on the documentation changes / clean-up for 
the unittest module discussed recently.

Michael Foord

-- 
http://mail.python.org/mailman/listinfo/python-list


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 you, what
> > you really want is a language who's specs are frozen - much like C
> > effectively is.  I hope python doesn't become that for a long time
> > yet, as there's too much it could do better.
>
> I'm feeling a bit old, crufty, and unmaintained myself,
> but I'll try not to take offense.

No offence meant, even if you do seem a bit set in your ways. ;)


> There is a difference between something that works fine
> until the rug gets pulled out and something that needs fixing.
> It's a shame to junk stuff that works.

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.

In the case of users wanting new versions, they may depend on the very
changes that break your libraries.  There's no solution to that.


> 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 and better coding
> practices

Better coding practises such as extensive unit tests?


> I suppose if the py3k migration inspires tons of
> insomniac young programmers to seek fame and admiration
> by cleaning up ancient libraries, it would be a good
> thing.  It seems to have happened in the Perl4->5
> migration some years ago.  Could happen again.

If they're unmaintained, absolutely, it'd be great for them to get new
maintainers.
-- 
http://mail.python.org/mailman/listinfo/python-list


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.  Click on one of these spam links and
you'll see Google ads.  Why would Google have any motivation to stop
selling ads?
-- 
http://mail.python.org/mailman/listinfo/python-list


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 kill
>> usenet spam with subject patterns.  But that's not a battle
>> you can win, so I broke down and joined all the other people
>> that just killfile everything posted via google.groups.
>
> Not very bright, eh?
>
>> AFAICT, if you're a google groups user your posts are not being
>> seen by many/most experienced (read "non-google-group") users.
>> This is mainly the fault of google who has refused to do
>> anything to stem the flood of span that's being sent via Google
>> Groups.
>
> Duh.

My.  That was certainly a well-reasoned and well-written
response.

-- 
Grant Edwards   grante Yow! Hey, waiter!  I want
  at   a NEW SHIRT and a PONY TAIL
   visi.comwith lemon sauce!
-- 
http://mail.python.org/mailman/listinfo/python-list


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.l.py here. And I haven't been able to get NNTP to work from my home
> > > either.
> >
> > Hi Mike;
> >
> > I am half way to killing Google groups myself.  Your message, and
> > allother Google groups messages, is coloured so that I can evaluate how
> > much I will miss. So far it looks like it will make reading this group a
> > whole lot more pleasant and so I will probably kill them soon.
> >
> > There are alternatives.  I run an ISP http://www.Vex.Net/
> > that offers NNTP access to my shell users.  You can also receive
> > this group as a mailing list which is how I read it.  Google is not the
> > only option out there.
> >
> > --
> > D'Arcy J.M. Cain <[EMAIL PROTECTED]> |  Democracy is three 
> > wolveshttp://www.druid.net/darcy/   |  and a sheep voting on
> > +1 416 425 1212 (DoD#0082)(eNTP)   |  what's for dinner.
> 
> 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
> about the latest ding dong and the next is a response to a post from
> last week.
> 

In any email client worth its salt, you can set up rules for
automatically moving new messages to different folders by matching
various criteria.  

In Evolution this is as easy as right clicking on a message from the
list in your inbox, select "Create Rule From Message > Filter on Mailing
List", and then choose a folder to redirect to.

Reading by thread instead of by date is as easy as Ctrl-T on your inbox.

It isn't much different in Thunderbird.

> But I agree...there are other alternatives. I'll have to start trying
> them again I suppose.
> 
> Mike
> 
-- 
Oook,
J. Cliff Dyer
Carolina Digital Library and Archives
UNC Chapel Hill

-- 
http://mail.python.org/mailman/listinfo/python-list


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 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 joined all the other people that just killfile
>  everything posted via google.groups.
>  AFAICT, if you're a google groups user your posts are not being
>  seen by many/most experienced (read "non-google-group") users.
>  This is mainly the fault of google who has refused to do
>  anything to stem the flood of span that's being sent via Google
>  Groups.
>  --
>  Grant Edwards   grante Yow! I would like to
>    at   urinate in an OVULAR,
> visi.comporcelain pool --
> >>> 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 loyalty only goes to far. This is a
> >>> complete lack of customer service.
> >> Unfortunately this means Google groups users are getting exactly the
> >> service they are paying for.
> >>
> >> regards
> >>   Steve
> >> --
> >> Steve Holden+1 571 484 6266   +1 800 494 3119
> >> Holden Web LLC  http://www.holdenweb.com/
> > 
> > Steve,
> > 
> > My workplace doesn't offer NNTP, so there is no good way to browse
> > c.l.py here. And I haven't been able to get NNTP to work from my home
> > either.
> > 
> > By applying this logic to Python and Linux (or any Open Source
> > product), they shouldn't be used either (since I'm not paying for
> > them).
> > 
> 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.
> 
> Without tunneling out to an NNTP proxy I don't see what other choice you 
> have.
> 
> regards
>   Steve

You could subscribe via email, and keep your own archive.  If you use an
email client with decent adaptive spam filter (i.e. not outlook), you
won't even notice the spam floating by.

It worked like a charm for me until I switched to digest view :)

-- 
Oook,
J. Cliff Dyer
Carolina Digital Library and Archives
UNC Chapel Hill

-- 
http://mail.python.org/mailman/listinfo/python-list


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 like C
> effectively is.  I hope python doesn't become that for a long time
> yet, as there's too much it could do better.

I'm feeling a bit old, crufty, and unmaintained myself,
but I'll try not to take offense.

There is a difference between something that works fine
until the rug gets pulled out and something that needs fixing.
It's a shame to junk stuff that works.

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 and better coding
practices

I suppose if the py3k migration inspires tons of
insomniac young programmers to seek fame and admiration
by cleaning up ancient libraries, it would be a good
thing.  It seems to have happened in the Perl4->5
migration some years ago.  Could happen again.
   -- Aaron Watters

===
http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=repeatedly+hammer
-- 
http://mail.python.org/mailman/listinfo/python-list


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
>  email format it's hard to follow the thread, so one moment I'm reading
>  about the latest ding dong and the next is a response to a post from
>  last week.

Maybe a thread bashing google "gorups" is a bad place to make this
comment, but Gmail organizes the threads so it's easy to follow
threads in mailing list conversations.  (And I see you're posting from
a gmail address, so...) Thunderbird is capable of grouping mailing
list messages by thread too, and I can only assume Outlook Express is
as well.

The recent deluge of spam has gone straight to my junk mail box, and
Gmail's spam filter only incorrectly flags as spam about one
python-list message per week--maybe instead of ignoring all posts from
Google users, you just need a better spam filter.
-- 
http://mail.python.org/mailman/listinfo/python-list


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 way, the "References:" header seems to get lost sometimes
through the mailing list when reading it as a Usenet group, so that
the discussion trees become a mess.

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
  Jabber ID: [EMAIL PROTECTED]
   (See http://ime.webhop.org for further contact info.)
-- 
http://mail.python.org/mailman/listinfo/python-list


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
> is the only one still clinging to NNTP when it appears a normal mail
> list is just as good.

Especially given that Mailman, a Python program, can handle all the
heavy lifting anyway.

-- 
D'Arcy J.M. Cain <[EMAIL PROTECTED]> |  Democracy is three wolves
http://www.druid.net/darcy/|  and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP)   |  what's for dinner.
-- 
http://mail.python.org/mailman/listinfo/python-list


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
posting.  I thought that all postings from Google groups had an
"Organization: http://groups.google.com"; header.  Is that not true?

-- 
D'Arcy J.M. Cain <[EMAIL PROTECTED]> |  Democracy is three wolves
http://www.druid.net/darcy/|  and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP)   |  what's for dinner.
-- 
http://mail.python.org/mailman/listinfo/python-list


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 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 joined all the other people that just killfile
>  everything posted via google.groups.
>  AFAICT, if you're a google groups user your posts are not being
>  seen by many/most experienced (read "non-google-group") users.
>  This is mainly the fault of google who has refused to do
>  anything to stem the flood of span that's being sent via Google
>  Groups.
>  --
>  Grant Edwards   grante Yow! I would like to
>    at   urinate in an OVULAR,
> visi.comporcelain pool --
> >>> 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 loyalty only goes to far. This is a
> >>> complete lack of customer service.
> >> Unfortunately this means Google groups users are getting exactly the
> >> service they are paying for.
>
> >> regards
> >>   Steve
> >> --
> >> Steve Holden+1 571 484 6266   +1 800 494 3119
> >> Holden Web LLC  http://www.holdenweb.com/
>
> > Steve,
>
> > My workplace doesn't offer NNTP, so there is no good way to browse
> > c.l.py here. And I haven't been able to get NNTP to work from my home
> > either.
>
> > By applying this logic to Python and Linux (or any Open Source
> > product), they shouldn't be used either (since I'm not paying for
> > them).
>
> 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.
>
> Without tunneling out to an NNTP proxy I don't see what other choice you
> have.
>
> regards
>   Steve
> --
> Steve Holden+1 571 484 6266   +1 800 494 3119
> Holden Web LLC  http://www.holdenweb.com/

OK. The way it was written + the mood I was in made me misinterpret
your meaning. I apologize.

Mike
-- 
http://mail.python.org/mailman/listinfo/python-list


  1   2   3   >