Re: Memory addressing

2007-04-29 Thread Hendrik van Rooyen
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote: > On Fri, 27 Apr 2007 16:07:57 -0700, castironpi wrote: > > > That's what we need: a CopyMemory() routine. > > What we _really_ need are Poke() and Peek() routines. > Yeah right! - we also need macros, then an assembler johnny like me can hack his

Re: Memory addressing

2007-04-28 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Fri, 27 Apr 2007 16:07:57 -0700, castironpi wrote: > > > That's what we need: a CopyMemory() routine. > > What we _really_ need are Poke() and Peek() routines. You can easily write them with ctypes (it's part of the standard library now, too) -- a

Re: Memory addressing

2007-04-28 Thread Steven D'Aprano
On Fri, 27 Apr 2007 16:07:57 -0700, castironpi wrote: > That's what we need: a CopyMemory() routine. What we _really_ need are Poke() and Peek() routines. -- Steven. -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory addressing

2007-04-27 Thread James Stroud
Simon Berube wrote: > On Apr 27, 3:52 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > >>On Fri, 2007-04-27 at 12:41 -0700, Simon Berube wrote: >> >>>Hi, >> >>> I have a rather simple question for which I couldn't find an >>>answer. I noticed how a significant number of objects in Python return >>

Re: Memory addressing

2007-04-27 Thread Simon Berube
Well what I was looking for is more along the lines of if it was possible to assign an object at a fixed memory address like C. But most importantly I was expecting it to be a bad habbit in python and was simply wondering what was the accepted manner of doing so. I did know everything was passed b

Re: Memory addressing

2007-04-27 Thread Gabriel Genellina
On 27 abr, 20:07, [EMAIL PROTECTED] wrote: > That's what we need: a CopyMemory() routine. See the copy and pickle modules. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Re: Memory addressing

2007-04-27 Thread castironpi
On Apr 27, 4:00 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Fri, 2007-04-27 at 12:56 -0700, Simon Berube wrote: > > When you call certain objects __repr__() strings in python you often > > get the : happen. I am simply trying to > > understand how that information can be used to recreate a c

Re: Memory addressing

2007-04-27 Thread Carsten Haese
On Fri, 2007-04-27 at 12:56 -0700, Simon Berube wrote: > When you call certain objects __repr__() strings in python you often > get the : happen. I am simply trying to > understand how that information can be used to recreate a certain > object that failed as per the given purpose of the __repr__(

Re: Memory addressing

2007-04-27 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Simon Berube wrote: > In short, how do I used strings to recreate > a an object. You already got the answer: you can't. Either you still have a reference to that object, or the memory address is not guaranteed to point to the object anymore even if you could get an objec

Re: Memory addressing

2007-04-27 Thread Bjoern Schliessmann
Simon Berube wrote: > When you call certain objects __repr__() strings in python you > often get the : happen. I am simply > trying to understand how that information can be used to recreate > a certain object that failed as per the given purpose of the > __repr__() functions. It cannot. The str

Re: Memory addressing

2007-04-27 Thread Simon Berube
On Apr 27, 3:52 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Fri, 2007-04-27 at 12:41 -0700, Simon Berube wrote: > > Hi, > > >I have a rather simple question for which I couldn't find an > > answer. I noticed how a significant number of objects in Python return > > a __repr__() string alon

Re: Memory addressing

2007-04-27 Thread Carsten Haese
On Fri, 2007-04-27 at 12:41 -0700, Simon Berube wrote: > Hi, > >I have a rather simple question for which I couldn't find an > answer. I noticed how a significant number of objects in Python return > a __repr__() string along the lines of : > > < Object at 0xXX> > >I find this notati

Memory addressing

2007-04-27 Thread Simon Berube
Hi, I have a rather simple question for which I couldn't find an answer. I noticed how a significant number of objects in Python return a __repr__() string along the lines of : < Object at 0xXX> I find this notation quite convenient to avoid out of control strings when using large arra