Re: how to close a gzip.GzipFile?

2005-04-01 Thread Sidharth
GzipFile has a parameter 'fileobj' which you could use. GzipFile( [filename[, mode[, compresslevel[, fileobj) For iteratng over the file how about : line = oldfileobj.readline() while line !="": oldmd5.update(line) line = oldfileobj.readline() -- http://mail.python.org/mailman/listinf

Re: Attributes and built-in types

2005-04-01 Thread Sidharth
You might find this usefull specifically the stuff on subclassing built-in types. http://www.python.org/2.2/descrintro.html -- http://mail.python.org/mailman/listinfo/python-list

Re: how can I extract all urls in a string by using re.findall() ?

2005-04-06 Thread Sidharth Kuruvila
#x27;) > > Why is there two "http" in it? and why are there so many ampty strings > in the tupe above? It's obviously not a url. How can I get the urls > correctly? > > Thanks in advance. > -- > 鹦鹉聪明绝顶、搞笑之极,是人类的好朋友。 > 直到有一天,我才发觉,我是鹦鹉。 > 我是翻墙的鹦鹉。 > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://blogs.applibase.net/sidharth -- http://mail.python.org/mailman/listinfo/python-list

Re: compound strip() string problem

2005-04-08 Thread Sidharth Kuruvila
': > os.system('%s %s %s' % (wincommand, flag, time)) > > if platform == 'posix': > os.system('%s %s %s' % (lincommand, flag, time)) > -- > Thanks, > Dylan > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://blogs.applibase.net/sidharth -- http://mail.python.org/mailman/listinfo/python-list

Re: Exception Handling

2005-04-08 Thread Sidharth Kuruvila
' + filename, pointer) >ftp.close() > except: ># do something with an error message here...? > > I'd like to use 'all_errors' but I don't know how! Will I have to > create a handler for each other exception? > > -- > http://mail.python.o

Re: Declaring variables from a list

2005-04-08 Thread Sidharth Kuruvila
> listitems = i > > print Var1 > 6 > print Var2 > 7 > print vAR3 > 8 > > Something like that? This doesn't work (obviously) but is there a way to do > this? > > TIA, > Cacti > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://blogs.applibase.net/sidharth -- http://mail.python.org/mailman/listinfo/python-list

Re: Declaring variables from a list

2005-04-08 Thread Sidharth Kuruvila
What I gave was a bad solution. Something that works right now, but probably shouldn't be done. On Apr 9, 2005 3:37 AM, Inyeol Lee <[EMAIL PROTECTED]> wrote: > On Sat, Apr 09, 2005 at 03:15:01AM +0530, Sidharth Kuruvila wrote: > > Python has a builtin function called loca

Re: check instace already running...

2005-04-09 Thread Sidharth Kuruvila
quot;there is an instance already running" else: file(lockfile, "w").close() atexit.register(lambda:os.remove(lockfile)) //Your code here On Apr 9, 2005 2:32 PM, Sidharth Kuruvila <[EMAIL PROTECTED]> wrote: > I haven't tested this. There is probably a better

Re: How to check whether a list have specific value exist or not?

2005-04-09 Thread Sidharth Kuruvila
;__init__', '__iter__', '__le__', '__len__', '__lt__', '__mul__', '__ne__', > '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__reversed__', > '__rmul__', &#

Re: Strings and Lists

2005-04-18 Thread Sidharth Kuruvila
e gladly recieved. > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://blogs.applibase.net/sidharth -- http://mail.python.org/mailman/listinfo/python-list

FW: pip Error

2021-12-11 Thread Sidharth S Nair
    Sent from [1]Mail for Windows   From: [2]Sidharth S Nair Sent: 11 December 2021 01:00 PM To: [3]python-list@python.org Subject: pip Error       Sent from [4]Mail for Windows   Hi, I am NINJAGAMING107 a active python user and lately I have