Re: TypeError not caught by except statement

2010-01-25 Thread tec
On 2010-1-25 16:35, siddu wrote: Hi, except not able to caught the TypeError exception occured in the below code log.info(refer,ret) in the try block throws a TypeError which is not caught . Also sometimes process is getting hanged.

Re: How to test if a file is a symbolic link?

2009-10-28 Thread tec
On 2009-10-29 11:19, Peng Yu wrote: 'symbolic_link' is a symbolic link in the current directory. I run 'python main.py', but it does not return me anything. I want to check if a file is a symbolic link. I'm wondering what is the correct way to do so? $cat main.py import stat import os st =

Re: unexplainable python

2009-09-26 Thread tec
dads 写道: ... enter number: 34567 _5digit function used 34 before sent to _2digit 34 slice when at _2digit function 34 before sent to plus_ten function 7 slice when at _2digit function This is the point. _2digit() only gets 1 digit(7) and needs accessing the second byte in: var =

Re: Remove empty strings from list

2009-09-14 Thread tec
Chris Rebert 写道: On Mon, Sep 14, 2009 at 6:49 PM, Helvin helvin...@gmail.com wrote: Hi, Sorry I did not want to bother the group, but I really do not understand this seeming trivial problem. I am reading from a textfile, where each line has 2 values, with spaces before and between the values.

Re: Remove empty strings from list

2009-09-14 Thread tec
Helvin 写道: Hi, Sorry I did not want to bother the group, but I really do not understand this seeming trivial problem. I am reading from a textfile, where each line has 2 values, with spaces before and between the values. I would like to read in these values, but of course, I don't want the

Re: s.index(x[, i[, j]]) will change the s ?

2009-09-09 Thread tec
s7v7nislands 写道: Thanks for your reply! Sorry for my poor english! On Sep 10, 12:33 pm, Chris Rebert c...@rebertia.com wrote: On Wed, Sep 9, 2009 at 9:00 PM, s7v7nislandss7v7nisla...@gmail.com wrote: hi all: what is the s.index() mean? does the index() change the s? It tells you the index