At Tuesday 10/10/2006 11:32, Kevien Lee wrote:
I agree with the problem caue of the the escape character,but when i folllow
these meth,it still didn't work.
Explain "didn't work". A full traceback would be useful.
It is so strang that the code work on another computer (OS is WinXP),but throw
At Tuesday 31/10/2006 21:16, [EMAIL PROTECTED] wrote:
casevh> You must use "gmake". "make" fails during "make check"
Very weird:
piggy:% make -v
GNU Make 3.80
piggy:% gmake -v
GNU Make 3.80
Nevertheless, using "gmake" instead of "make" did indeed work. Thanks for
the hint
At Wednesday 8/11/2006 05:26, George Sakkis wrote:
Or you may have this done automatically by hacking the Set class:
from sets import Set
import cPickle as pickle
Set.__reduce__ = lambda self: (set, (self._data,))
s = Set([1,2,3])
x = pickle.dumps(s)
print pickle.loads(x)
This doesn't work
At Wednesday 8/11/2006 16:33, John Salerno wrote:
> class Character(object):
> def __init__(self, name, strength, dexterity, intelligence):
> self.name = name
> self.health = 10
> self.strength = strength
> self.dexterity = dexterity
> self.intelligenc
At Monday 13/11/2006 01:55, John Machin wrote:
Ben Finney wrote:
> "ronrsr" <[EMAIL PROTECTED]> writes:
>
> > #row is a dictionary with keys: zid, keywords, citation, quotation
> > def print_row(row):
> >print """
> > [...]
> > """
>
> You're printing a string, and never using th
At Friday 25/8/2006 02:18, [EMAIL PROTECTED] wrote:
> x+y get translated to x.__add__(y)
No that's not true at all. The self argument to __add__ ends
up being the Add instance, not the Item instance:
z=x+y is translated to z.__add__(y)
Well, I deleted my response after I noticed that Simon
At Saturday 26/8/2006 06:13, nephish wrote:
i have an app that runs three classes as threads in the same program.
some of them need to be able to share some functions. Can i set a
function before i define a class and have the class use it ? Kinda like
this.
def some_function(var1, var2):
do
At Thursday 31/8/2006 10:01, alper soyler wrote:
I changed the script as you wrote below:
directory = 'pub/kegg/genomes'
Sorry, in the original comment I said "change it to be an absolute
path" but didn't write it well.
This line should read:
directory = '/pub/kegg/genomes'
Gabriel Gene
At Friday 1/9/2006 06:32, alper soyler wrote:
Thank you very much for your help. The program works however, after
downloading 121 '.pep' files, it gave me time out error:
Traceback (most recent call last):
File "ftp1.0.py", line 18, in ?
for filename in ftp.nlst():
...
File "/usr/lib
At Monday 25/9/2006 11:08, Jon Ribbens wrote:
>> What precisely do you think it would "break"?
>
> existing code, and existing tests.
I'm sorry, that's not good enough. How, precisely, would it break
"existing code"? Can you come up with an example, or even an
explanation of how it *could* brea
At Tuesday 26/9/2006 04:16, Lawrence D'Oliveiro wrote:
>> >> What precisely do you think it would "break"?
> FWIW, a *lot* of unit tests on *my* generated html code would break...
Why did you write your code that way?
Uhm, maybe because I relied on the published documentation of a
published s
At Tuesday 26/9/2006 12:53, Jon Ribbens wrote:
> BTW, I am curious about how you do unit testing. The example that I used
> in my summary is a very common pattern but would break in cgi.escape
> changed it's semantics. What do you do instead?
To be honest I'm not sure what *sort* of code people
At Thursday 28/9/2006 12:23, Ramon Diaz-Uriarte wrote:
Going back to the original question, a related question: does anybody
know why there are so few books on data structures and algorithms that
use Python?
I remember that, at least ~ 12 years ago there were many (and very
good) books that use
At Saturday 30/9/2006 19:09, Steve Holden wrote:
> while 1:
> print 'Question [Y/[N]]?',
> if sys.stdin.readline().strip() in ('Y','y'):
> #do something
> pass
>
> $ python q.py
> Question [Y/[N]]?y
> Question [Y/[N]]?y
> Question [Y/[N]]?y
>
Yup. When you execute
At Tuesday 3/10/2006 02:15, Bryan wrote:
>i would like to save an exception and reraise it at a later time.
>def foo():
>Â Â try:
>Â Â Â Â 1/0
>Â Â except Exception, e:
>Â Â Â Â exception = e
>
>if exception: raise exception
>
>with the above code, i'm able to successfully raise the ex
At Tuesday 3/10/2006 06:05, Wijaya Edward wrote:
How can I pass Array, Hash, and a plain variable
in to a function at the same time.
I come from Perl. Where as you probably know
it is done like this:
sub myfunc {
my ($plain_var, $hash_ref,$arref) = @_;
# Do sth with those variables
At Tuesday 3/10/2006 21:52, Ben Finney wrote:
Gerrit Holl <[EMAIL PROTECTED]> writes:
> operations that aren't currently defined in PEP 358, like:
>
> - str methods endswith, find, partition, replace, split(lines),
> startswith,
> - Regular expressions
>
> I think those can be use
At Thursday 30/11/2006 03:40, Scheol Service wrote:
i know this. Is there better directions on how to use it?
Have you tried it? What's your actual problem? See http://www.py2exe.org/
--
Gabriel Genellina
Softlab SRL
__
Correo Yahoo!
Espacio
At Saturday 2/12/2006 00:40, [EMAIL PROTECTED] wrote:
I'm trying to do in Zope, which doesn't allow "_" characters at the
beginning of identifiers. Even in an external method, it gives me an
error when I try to reference the o.a. Is there a trick to do it
some other way?
Better to ask on a Z
19 matches
Mail list logo