accident!2268 (6/12/2007 7:28:58 AM) comp.unix.solaris hi i accidentally mv some critical files to a non existent directory...so that now, all the files are "combined" into one..how can i recover back my files? thanks ... s99999999s2003
using 2 files compare488 (5/21/2007 10:10:47 AM) comp.lang.awk hi say 2 files i have. file1 and file2 both same data: one two three four I want to find 2nd record whether they are the same. awk ' FNR==2{ if ( $0 == a ){ print "equal" } ... s99999999s2003
zip list with different length56 (4/4/2007 7:53:27 AM) comp.lang.python hi suppose i have 2 lists, a, b then have different number of elements, say len(a) = 5, len(b) = 3 >>> a = range(5) >>> b = range(3) >>> zip(b,a) [(0, 0), (1, 1), (2, 2)] >>> zip(a,b) [(0, 0), (1, 1), (2, 2)] ... s99999999s2003
which methods to use?126 (3/29/2007 12:09:29 AM) comp.lang.python hi which is the best methods to use for list copying. using list() , [:] or create list through list comprehension. what are the differences between these ? thanks ... s99999999s2003
using regexp48 (3/20/2007 5:33:13 AM) comp.lang.python hi how can i use regexp to group these digits into groups of 3? eg line 123456789123456789 i have : pat = re.compile("line\s+(\d{3})" , re.M|re.DOTALL) but this only gives the first 3. I also tried "line\s... s99999999s2003
match nested parenthesis39 (1/23/2007 3:03:01 AM) comp.lang.python hi i wish to find an reg exp for matching nested parenthesis of varying level like string = "somewords1(words(somewords2)-(some(some)words3)somestuff)somestuff" and be able to evaluate the pair starting from th... s99999999s2003
printing variables932 (10/6/2006 2:47:40 AM) comp.lang.python hi say i have variables like these var1 = "blah" var2 = "blahblah" var3 = "blahblahblah" var4 = "...." var5 = "...".. bcos all the variable names start with "var", is there a way to conveniently print those v... s99999999s2003
switch user18 (10/3/2006 3:37:57 AM) comp.lang.python hi due to certain constraints, i will running a python script as root inside this script, also due to some constraints, i need to switch user to user1 to run the rest of the script...is there a way ?thanks ... s99999999s2003
concat next line with previous413 (9/26/2006 10:16:25 AM) comp.lang.python hi what is the python way to concat 2 lines eg line 1 with some text line 2 with some text i want to bring line 2 up , such that i get one whole string. line 1 with some text line 2 with some text ... s99999999s2003
Upgrading question212 (9/21/2006 12:13:18 AM) comp.lang.python hi just want to get some opinions i am working in unix and my Python version is 2.4.1 I would like to upgrade my version to 2.5 stable. but i have many scripts already running using 2.4.1. Can i just install 2.... s99999999s2003
re sub help712 (11/5/2005 6:49:03 AM) comp.lang.python hi i have a string : a = "this\nis\na\nsentence[startdelim]this\nis\nanother[enddelim]this\nis\n" inside the string, there are "\n". I don't want to substitute the '\n' in between the [startdelim] and [enddel... s99999999s2003(73)
getting results into one variable410 (11/10/2005 8:36:38 AM) comp.lang.python hi the database "execute" function returns a list of logical results. Each logical result is a list of row tuples, as explained in the documents. everytime i use it to execute various statements, it returns me... s99999999s2003(73)
generate HTML812 (11/14/2005 9:56:40 AM) comp.lang.python hi i have fucntion that generates a HTML page def genpage(arg1,arg2): print ''' BLAH BLAH.....%s %s ''' % (arg1, arg2) print ''' ....blah blah... %s %s ''' % (arg1,arg2)' The func... s99999999s2003(73)
Question regarding mkdir of ftputil116 (2/13/2006 10:01:47 AM) comp.lang.python hi i am currently using the FTP wrapper from http://cheeseshop.python.org/pypi/ftputil/2.0.3 The documentation states "In the current implementation, this doesn't construct "intermediate" directories which don'... s99999999s2003(73)
comparing huge files315 (3/16/2006 2:13:25 AM) comp.lang.python hi i wrote some code to compare 2 files. One is the base file, the other file i got from somewhere. I need to compare this file against the base, eg base file abc def ghi eg another file abc def ghi jkl after... s99999999s2003(73)
sending ctrl C to a process36 (3/29/2006 2:14:51 AM) comp.lang.python hi i have a program that works very similar to tail -f in Unix It will need a Ctrl-C in order to break out of the program. I wish to run this program using python (either thru os.system() or some other subproce... s99999999s2003(73)
printing variables932 (10/6/2006 2:47:40 AM) comp.lang.python hi say i have variables like these var1 = "blah" var2 = "blahblah" var3 = "blahblahblah" var4 = "...." var5 = "...".. bcos all the variable names start with "var", is there a way to conveniently print those v... s99999999s2003(73)
using regexp48 (3/20/2007 5:33:13 AM) comp.lang.python hi how can i use regexp to group these digits into groups of 3? eg line 123456789123456789 i have : pat = re.compile("line\s+(\d{3})" , re.M|re.DOTALL) but this only gives the first 3. I also tried "line\s... s99999999s2003(73)
which methods to use?126 (3/29/2007 12:09:29 AM) comp.lang.python hi which is the best methods to use for list copying. using list() , [:] or create list through list comprehension. what are the differences between these ? thanks ... s99999999s2003(73)