Re: Terminating python script easily

2009-10-22 Thread Bahadir Balban
c, >> but I have to do this many times before I can kill the script for >> good. I was wondering is there a way that I define a signal handler >> and kill the whole thing at once with a single ctrl-c? Perhaps I >> should  also call my other scripts with a method other than o

Re: Format string with single quotes in it

2009-09-26 Thread Bahadir
On Sep 26, 6:33 am, "Gabriel Genellina" wrote: > > So, look in your file for lines ending in % > > -- > Gabriel Genellina Hello All, I fixed it with your help. Sometimes you need that extra insight from comp.lang.python. Thank you so much, Bahadir -- http://mail.py

Format string with single quotes in it

2009-09-25 Thread Bahadir
ions' and trying to format this as follows: str % (0, 0) I get the error: ValueError: unsupported format character ' ' (0xa) at index 5541 I also tried: # Replace single quotes with \' str = str.replace("'", "\'") and doubling the backward

Re: Array of objects lost in unpickling

2009-09-13 Thread Bahadir
On Sep 13, 5:48 pm, Jon Clements wrote: > On 13 Sep, 15:19, Bahadir wrote: > > > > > Hi, > > > I have a class: > > > class second: > >     a = None > >     b = None > > > class first: > >     array = [] > > > I popu

Array of objects lost in unpickling

2009-09-13 Thread Bahadir
irst class is there, but array has no elements. If I reopen the shelve in the same script right after shelve.close(), the elements are there. Also there are no errors printed out. Any idea why the array of instances are lost? Thanks, Bahadir -- http://mail.python.org/mailman/listinfo/python-list