The return code

2008-11-13 Thread devi thapa
Hi, I am running one service in the python script eg like "service httpd status". If I execute this command in normal shell kernel, the return code is 3. But in the python script its return code is different, ie not 3, I mean to say that return codes are differing. But I want the return

return a value to shell script

2008-11-12 Thread devi thapa
Hi, I am executing a python script in a shell script. The python script actually returns a value. So, can I get the return value in a shell script? If yes, then help me out. Regards, Devi -- http://mail.python.org/mailman/listinfo/python-list

declaration problem

2008-11-07 Thread devi thapa
Hi, I am using the command recv(..) to receive a message from client. retval = recv(my_socket, *buf, len(buf) , 0) and its giving this error File "./server1.py", line 31 retval = recv(my_socket, *buf, len(buf) , 0) ^ SyntaxEr

parse a normal textfile

2008-10-01 Thread devi thapa
hi all I have one normal text file. I need to parse the file, that too in an associative way . suppose that below is the normal textfile name='adf' id =1 value=344 So when I give 'name' as an input, the output must be 'adf' so please help me out with this. regards, devi. -- http://