[BangPypers] Reg : Python Scripting

2009-12-09 Thread murugadoss
Hello, I am writing a python script for executing my program. This is a thread program and on execution get the input from the user or from the python script. My python script is successfully executing, till running of the my program.Then i send the input to thread from the script. But since t

Re: [BangPypers] Reg : Python Scripting

2009-12-13 Thread murugadoss
how to pass there inputs -- Thanks & Regards V.Murugadoss On Wed, Dec 9, 2009 at 8:36 PM, Roshan Mathews wrote: > On Wed, Dec 9, 2009 at 4:34 PM, murugadoss > wrote: > > But since the thread is waiting for input ( in a while loop ), the > control > > is not coming to nex

Re: [BangPypers] Reg : Python Scripting

2009-12-13 Thread murugadoss
nput My input is given in the next line of the script.The control is waiting at the first line (os.system("./a.out")). How shall i do this ? -- Regards V.Murugadoss On Mon, Dec 14, 2009 at 2:10 PM, Noufal Ibrahim wrote: > On Mon, Dec 14, 2009 at 10:04 AM, murugadoss >wrote: > >

[BangPypers] Help plzz..

2010-01-20 Thread murugadoss
Hello, I want to learn python scripting. Can anyone suggest me any book or link to start with.Books with sample example will be more helpfull. -- Thanks & Regards V.Murugadoss ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/ma

Re: [BangPypers] unsubscribe

2010-04-29 Thread murugadoss
BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers -- Thanks & Regards V.Murugadoss > ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers

[BangPypers] Extracting tar.gz file

2010-05-26 Thread murugadoss
Hi all, I am trying to extract tar.gz file using python script. when i do so, i get an error, tar = tarfile.open("sample.tar.gz","r") File "/usr/local/lib/python2.5/tarfile.py", line 1153, in open raise ReadError("file could not be opened successfully") tarfile.ReadError: file could not

Re: [BangPypers] Extracting tar.gz file

2010-05-26 Thread murugadoss
nstinctively, the error seems to be opening the file and not with the > > tarfile decoding. > > You may want to check if open("sample.tar.gz","r") works. > > > > Dhananjay > > > > > > On Thu, May 27, 2010 at 6:19 AM, murugadoss >wr

Re: [BangPypers] Extracting tar.gz file

2010-05-26 Thread murugadoss
gt; tarfile decoding. > You may want to check if open("sample.tar.gz","r") works. > > Dhananjay > > On Thu, May 27, 2010 at 6:19 AM, murugadoss >wrote: > > > Hi all, > > > > I am trying to extract tar.gz file using python script. when

[BangPypers] Tcp/ip server client program

2010-05-27 Thread murugadoss
Hello, I am trying out client/server program in python using both udp and tcp/ip. UDP is working,but for tcp/ip program, i get an error as Traceback (most recent call last): File "./server.py", line 11, in client_socket, address = server_socket.accept() File "/usr/local/lib/python2.5/soc

[BangPypers] pack data

2010-05-28 Thread murugadoss
Hello all, I am trying a sample program for send set of data [ kept in array]. I have attached the code below, import struct sendvalues = [181, 98, 11, 01] for i in range(4): snddata = struct.pack('int',int(sendvalue[i])) sendto(sndData,("localhost")) i am getting error as, Traceback (most rec

[BangPypers] Packing set of character and string

2010-05-29 Thread murugadoss
Hi, I am trying to pack set of strings, can anyone suggest me a better way to do it. -- Thanks & Regards V.Murugadoss ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers

[BangPypers] Packing string and character

2010-05-29 Thread murugadoss
Hi all, I want to know how to pack a set of character or string, for example Data = ['Date','time',year',23] ( data can be any combination of string,character,integer ..etc) Pack the data to single message to send in network, Can any suggest me, how to do it Thank in advance -- Thanks & Regards

[BangPypers] splitting the string

2010-05-29 Thread murugadoss
Hi, I want to split the string using the delimiter, can any please suggest me way to do it in python for example: one;two;three;four (string) i need to split this string using ; like one,two,three,four Thank in advance -- Thanks & Regards V.Murugadoss __

[BangPypers] Extracting zipfile

2010-05-30 Thread murugadoss
Hi, I am trying to extract a zipfile, using zipfile.extractall(). when i do so, i am getting an error as "AttributeError: 'module' object has no attribute 'extractall' " >>> zipfile.extractall("home/murugadoss/testfile.zip") Traceba

[BangPypers] packing floating data

2010-05-31 Thread murugadoss
Hi all, I am trying to pack a float value like 45.90,43.78,543.87. i am using struct.pack( ) function. When i unpack (using struct.unpack) and print it i am getting only real part of the number. Type of the variable is long, var = 45.90 data = struct.pack("!l",float(var)) when i unpack and print

Re: [BangPypers] packing floating data

2010-05-31 Thread murugadoss
On Mon, May 31, 2010 at 5:34 PM, murugadoss > wrote: > > Hi all, > > > > I am trying to pack a float value like 45.90,43.78,543.87. i am using > > struct.pack( ) function. When i unpack (using struct.unpack) and print it > i > > am getting only real part of the n

[BangPypers] time in seconds and milliseconds

2010-05-31 Thread murugadoss
Hi, how to represent the time in seconds and milliseconds ?A function similar to gettimeofday() in c. gettimeofday(&tv, NULL) Thanks for all ur support. -- Thanks & Regards V.Murugadoss ___ BangPypers mailing list BangPypers@python.org http://mail.py

Re: [BangPypers] time in seconds and milliseconds

2010-05-31 Thread murugadoss
It is done. Thank u -- Thanks & Regards V.Murugadoss On Tue, Jun 1, 2010 at 10:19 AM, Pradeep Gowda wrote: > On Mon, May 31, 2010 at 8:33 PM, murugadoss > wrote: > > how to represent the time in seconds and milliseconds ?A function similar > to > > gettimeofday() i

[BangPypers] sending binary files over socket

2010-05-31 Thread murugadoss
hi, I need to pack and send a binary file over socket. The binary file is already existing. Do i need to unpack and read the file and then pack it once again using struct.pack or i can directly send the binary file. Since the binary file is very big,reading and packing is little difficult in my

[BangPypers] binary file unpacking

2010-06-01 Thread murugadoss
Hi, I am trying to unpack a binary file, rfile = open(filename,'rb') print "file Size", os.path.getsize(filename) text = rfile.read() print "Text", text while(text != 'EOF'): text = struct.unpack("!c",text) Message = Message

[BangPypers] Accessing string from thread

2010-06-02 Thread murugadoss
Hi all, I am trying to access the packed string from one thread to another. I am giving the brief view of what i am trying to do, Thread1:(file name : Thread1.py) 1.I have a two global variables string =' ' Teststring = "I am written for testing" 2. i am packing the string using struct.pack met

[BangPypers] ReadError: opening tar file

2010-06-03 Thread murugadoss
Hello, I am trying to extract a tar file. while doing this i check the valid tar file using is_tarfile( ). It is working fine in a 32-bit linux machine with python 2.5.4 version and when i try it out in a 64-bit linux pc, i end up saying file is invalid(false). This machine was using python 2.4 an

Re: [BangPypers] ReadError: opening tar file

2010-06-04 Thread murugadoss
func > func1 func > func1 func > func1 False As u can see, the "func(name, "r", fileobj)", is returning none. The same test output in 32bit Mc: tarfile.is_tarfile(tar) func > func1 True Any information on this will be very useful. If i am wrong. Please co

Re: [BangPypers] ReadError: opening tar file

2010-06-04 Thread murugadoss
ave tested the same in different systems. -- Thanks & Regards V.Murugadoss On Fri, Jun 4, 2010 at 7:35 PM, Anand Balachandran Pillai < abpil...@gmail.com> wrote: > On Fri, Jun 4, 2010 at 11:27 AM, murugadoss >wrote: > > > Hello, > > > > I am trying to extr

Re: [BangPypers] ReadError: opening tar file

2010-06-04 Thread murugadoss
ersion may affect in any way ?? Thanks for the reply -- Thanks & Regards V.Murugadoss On Fri, Jun 4, 2010 at 7:55 PM, Anand Balachandran Pillai < abpil...@gmail.com> wrote: > On Fri, Jun 4, 2010 at 4:15 PM, murugadoss > wrote: > > > Thank for the reply. > > The t

Re: [BangPypers] ReadError: opening tar file

2010-06-06 Thread murugadoss
once i reach office. 4. currently i am using, os.path.isfile("*.tar.gz") os.system("tar -C [some directory] -xvf *.tar.gz") Any input on these issues will be very helpful. Thank u. -- Thanks & Regards V.Murugadoss On Mon, Jun 7, 2010 at 4:37 AM, Sridhar Ratnakumar wrote:

[BangPypers] Accessing file using httpsconnection

2010-10-12 Thread murugadoss
nformation. I would like to know, the debugging procedure to trace the reason for fault. ("Python is compiled is SSL to support httpsconnection) Any suggestions will be helpful. -- Thanks & Regards Murugadoss ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers