Re: Rotating a cube

2008-07-17 Thread Ryan Smith
Have you taken the time to solve the problem for the 2D case?

I can't say my code is correct or even good python, but this was my
attempt at the 2D case, maybe it will give you some ideas.

http://code.google.com/p/rs-wxpython-nooberdev/source/browse/rectangle.py

For the rest of c.l.p, criticism is welcome :-)

Regards,
Ryan

On Jul 17, 2:11 am, J-Burns <[EMAIL PROTECTED]> wrote:
> On Jul 17, 12:53 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>
> > J-Burns wrote:
> > > Is there a built in Python function for this?
>
> > for answering questions that have nothing to do with programming, and
> > looks quite a bit like homework?  don't think they've added that one yet.
>
> > maybe you should look for a geometry newsgroup/forum?
>
> > 
>
> I meant to ask how would you do this in Python... :S

--
http://mail.python.org/mailman/listinfo/python-list


Re: mmap and shared memory

2008-02-15 Thread Ryan Smith-Roberts
On Feb 11, 3:41 pm, Matias Surdi <[EMAIL PROTECTED]> wrote:
> Suppose I've a process P1, which generates itself a lot of data , for
> example 2Mb.
> Then, I've a process P2 which must access P1 shared memory and,
> probably, modify this data.
> To accomplish this, I've been digging around python's mmap module, but I
> can't figure how to use it without files.
>
> Could anybody explain me how could this be accomplished? An example will
> be very appreciated. Thanks a lot for your help.

A non-portable solution, for modern Linux systems, is to create and
mmap a file in the /dev/shm directory.  This is a more "unix-y"
solution than the SysV SHM interface mentioned elsewhere in the
thread, since it gives you files you can cat, ls, chown, etc.  Files
created in this directory may hit swap, but don't consume normal disk
space.
-- 
http://mail.python.org/mailman/listinfo/python-list