Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~3K People Reached
Favorite Forums
Favorite Tags
Member Avatar for vsagarmb

<code=python> >>>f = file("sendBuffer.dat","rb") >>> f.read() '\x81x\x00>\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00A .\x00\x10aG\xce\x00 \x00\x00\x00\x00\x00\x00\x00\x01\xcd\xccL@\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' >>> text = f.read() >>> print text </code> In the above code f.read() prints the data, but when i say print text or print length of text it returns NULL and zero respectively. Any Ideas?

Member Avatar for vsagarmb
0
86
Member Avatar for vsagarmb

I have a funny problem. I am trying to split a string. [code=python] DEVICE_IP = '164.178.7.30' ip = DEVICE_IP.spilt('.') print ip[0]+'-'+ip[1]+'-'+ip[2]+'-'+ip[3] [/code] The above code throws the error [code] Traceback (most recent call last): File "/home/englotk/test", line 2, in <module> ip = str(DEVICE_IP).spilt('.') AttributeError: 'str' object has no attribute 'spilt' …

Member Avatar for jice
0
2K
Member Avatar for vsagarmb

Hi, I am hosting a UDP server as part of my application on a thread. The problem is when I close the application it doesn't exit completely because the server is still running on the thread. [code=python] class pdu_parser(Thread): run_parser = True sock = None def __init__(self): Thread.__init__(self) def run(self): …

Member Avatar for jcao219
0
134
Member Avatar for vsagarmb

Hi Guys, I am trying to pass a c structure from C to Python. Write the recieved structure at Python to a file, read back the structure from the file at Python and send it back to C. I am passing the structure as an array of bytes and write …

Member Avatar for vegaseat
0
153
Member Avatar for vsagarmb

I have installed the Python Imaging Library. But i am not able to use it. When I run the script in windows it says "ImportError: No module named ImageGrab" I also created the PATH VARIABLE called PYTHONPATH and gave the location of the installed modules. Please help.

Member Avatar for Stefano Mtangoo
0
283
Member Avatar for vsagarmb

Hi, I am trying to pack a unicode string of 40 bytes using the pack method. [code=python] data = pack('<8sB40s', asc_time, language_id, message) [/code] it throws the following error: struct.error: argument for 's' must be a string What is the argument for a unicode string? Thanks in advance.

Member Avatar for d5e5
0
160
Member Avatar for vsagarmb

i am not able to figure out why python throws an error when i call this function. In the code snippet below when i call set_greyLevel() python throws an error. If i comment the function call it works fine. Please help. Thanks in advance. [code=python] def set_greyLevel(self, grayScale): if grayScale …

Member Avatar for willygstyle
0
158