Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > struct.pack returns nothing [2]

Reply
Thread Tools

struct.pack returns nothing [2]

 
 
andmarti@gmail.com
Guest
Posts: n/a
 
      03-19-2007
On Mon, Mar 19, 2007 at 02:12:39AM -0300, wrote:
> If I build a strict with:

Sorry, I meant script.
>
> import struct
> print struck.pack ('i', 1)
>
> it returns a '\n'.
> What's wrong with it???
>
>

--
Andrés M.
---------------------------------------------
 
Reply With Quote
 
 
 
 
kyosohma@gmail.com
Guest
Posts: n/a
 
      03-19-2007
On Mar 19, 12:22 am, andma...@gmail.com wrote:
> On Mon, Mar 19, 2007 at 02:12:39AM -0300, andma...@gmail.com wrote:
> > If I build a strict with:

>
> Sorry, I meant script.
>
> > import struct
> > print struck.pack ('i', 1)

>
> > it returns a '\n'.
> > What's wrong with it???
> >

>
> --
> Andrés M.
> ---------------------------------------------


When I run it, I get '\x01\x00\x00\x00'

This is my first time using the module, so I really can't be of much
help. I recommend that you read the docs at:

http://docs.python.org/lib/module-struct.html

This may be helpful to you as well:

http://aspn.activestate.com/ASPN/Coo.../Recipe/498149

Mike

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
re module: Nothing to repeat, but no sre_constants.error: nothing torepeat ? Devin Jeanpierre Python 2 02-14-2012 01:33 PM
DataGrid.FindControl() returns nothing MattB ASP .Net 2 02-16-2005 04:47 AM
qry returns nothing (no data matched qry) Bob Green via .NET 247 ASP .Net 2 04-16-2004 08:54 AM
Query returns nothing Bijoy Naick ASP .Net 2 02-01-2004 07:16 PM
show running returns nothing, routing stops Richard Antony Burton Cisco 10 11-25-2003 10:39 AM



Advertisments