Re: [Tutor] what is 'doubleword alignment'?

2011-07-17 Thread Kushal Kumaran
On Sun, Jul 17, 2011 at 9:15 PM, Walter Prins wrote: > > > On 17 July 2011 15:26, Lisi wrote: >> >> Sorry to be slow.  Blame virtually no sleep last night ;-(  But even were >> the >> power of two bit correct (and I see subsequently that it is not), how is >> 18 a >> power of two? >> > > The 18 b

Re: [Tutor] how to add directory to python search list

2011-07-17 Thread ALAN GAULD
It depends on what shell you are using. Most beginners use the Bash shell and for that you need to open your .bash_profile (or .bashrc, I can't recall the preferred one for env vars...) and add a line like: export PYTHONPATH=$PYTHONPATH:/path/to/my/python/modules Next time you login Python shou

Re: [Tutor] Filling orders FIFO

2011-07-17 Thread Steven D'Aprano
Izz ad-Din Ruhulessin wrote: Why are you doing it at the low level? Have you consideren using a framework like Django for example? Who is this question addressed to? Me? If so, my answer is that Django is an awfully large dependency if all you need is a queue. But if you think that Django h

Re: [Tutor] what is 'doubleword alignment'?

2011-07-17 Thread Walter Prins
On 17 July 2011 15:26, Lisi wrote: > Sorry to be slow. Blame virtually no sleep last night ;-( But even were > the > power of two bit correct (and I see subsequently that it is not), how is 18 > a > power of two? > > The 18 bytes is a bit of an irrelevance. The point is that if the start of th

Re: [Tutor] what is 'doubleword alignment'?

2011-07-17 Thread Lisi
On Saturday 16 July 2011 21:53:55 Albert-Jan Roskam wrote: > I know that the buffer is comprised of variables of 8-bytes, or multiples > thereof, each. Numeric variables are 8 bytes, char vars are at least 8 > bytes. For example, a 10-byte value is 'ceiled' to 18 bytes. This is done > with padding

Re: [Tutor] how to add directory to python search list

2011-07-17 Thread Surya P.K. Kasturi
Thanks a lot. your posts are really helpful. On Sun, Jul 17, 2011 at 4:41 PM, Steven D'Aprano wrote: > Surya P.K. Kasturi wrote: > > can you tell me in detail how to do this. >> I am new to linux. >> > > "this" being: > > On Sat, Jul 16, 2011 at 11:48 AM, Alan Gauld * >> *wrote: >> >>> You need

Re: [Tutor] error in using TurtleWorld modules, ThinkPython.org Book

2011-07-17 Thread Surya P.K. Kasturi
Thanks, .. that was a silly mistake. On Sun, Jul 17, 2011 at 2:56 PM, Peter Otten <__pete...@web.de> wrote: > Surya P.K. Kasturi wrote: > > > I am using Think Python book, to learn python. > > There is a module TurtleWorld that they described to draw lines < > > http://www.greenteapress.com/thi

Re: [Tutor] Hello World in Python without space

2011-07-17 Thread Lisi
On Saturday 16 July 2011 03:15:12 Richard D. Moores wrote: > But that makes me wonder if there isn't a simpler way to do it with > Python -- to delete the contents of a file without deleting the file? Up to now, knowing no better ;-), I have opened the file in, or copied and pasted the contents o

Re: [Tutor] how to add directory to python search list

2011-07-17 Thread Steven D'Aprano
Surya P.K. Kasturi wrote: can you tell me in detail how to do this. I am new to linux. "this" being: On Sat, Jul 16, 2011 at 11:48 AM, Alan Gauld wrote: You need to add the folder to your PYTHONPATH environment variable. You usually do this your .login or .profile file. Python will add the

Re: [Tutor] error in using TurtleWorld modules, ThinkPython.org Book

2011-07-17 Thread Peter Otten
Surya P.K. Kasturi wrote: > I am using Think Python book, to learn python. > There is a module TurtleWorld that they described to draw lines < > http://www.greenteapress.com/thinkpython/swampy/install.html> > > Though I could run the below code in the python shell, I couldn't do it > through a s

Re: [Tutor] how to add directory to python search list

2011-07-17 Thread Peter Otten
Surya P.K. Kasturi wrote: > OS : Ubuntu Linux > Python Version : 2.6.4 > > I have some third party modules to be installed in my computer. > So, I want to add the module directory to python search list. The way I find most convenient is to create a text file with the .pth suffix in a directory t

[Tutor] error in using TurtleWorld modules, ThinkPython.org Book

2011-07-17 Thread Surya P.K. Kasturi
I am using Think Python book, to learn python. There is a module TurtleWorld that they described to draw lines < http://www.greenteapress.com/thinkpython/swampy/install.html> Though I could run the below code in the python shell, I couldn't do it through a script file. This is the script : fro