Re: Load a list subset with pickle?

2009-10-16 Thread Gabriel Genellina
En Thu, 15 Oct 2009 16:28:11 -0300, Peng Yu pengyu...@gmail.com escribió: On Thu, Oct 15, 2009 at 12:01 PM, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Thu, 15 Oct 2009 13:05:18 -0300, Peng Yu pengyu...@gmail.com escribió: How do I determine if I have loaded all the elements? I use

Re: Load a list subset with pickle?

2009-10-15 Thread Peng Yu
On Tue, Oct 13, 2009 at 1:23 PM, Robert Kern robert.k...@gmail.com wrote: On 2009-10-13 13:00 PM, Peng Yu wrote: I use pickle to dump a long list. But when I load it, I only want to load the first a few elements in the list. I am wondering if there is a easy way to do so? Thank you! Not by

Re: Load a list subset with pickle?

2009-10-15 Thread Robert Kern
On 2009-10-15 11:05 AM, Peng Yu wrote: On Tue, Oct 13, 2009 at 1:23 PM, Robert Kernrobert.k...@gmail.com wrote: On 2009-10-13 13:00 PM, Peng Yu wrote: I use pickle to dump a long list. But when I load it, I only want to load the first a few elements in the list. I am wondering if there is a

Re: Load a list subset with pickle?

2009-10-15 Thread Gabriel Genellina
En Thu, 15 Oct 2009 13:05:18 -0300, Peng Yu pengyu...@gmail.com escribió: How do I determine if I have loaded all the elements? I use the following code. I'm wondering if there is any better solution than this. ### import pickle alist = [1, 2.0, 3, 4+6j]

Re: Load a list subset with pickle?

2009-10-15 Thread Gabriel Genellina
En Thu, 15 Oct 2009 13:05:18 -0300, Peng Yu pengyu...@gmail.com escribió: How do I determine if I have loaded all the elements? I use the following code. I'm wondering if there is any better solution than this. ### import pickle alist = [1, 2.0, 3, 4+6j]

Re: Load a list subset with pickle?

2009-10-15 Thread Peng Yu
On Thu, Oct 15, 2009 at 12:01 PM, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Thu, 15 Oct 2009 13:05:18 -0300, Peng Yu pengyu...@gmail.com escribió: How do I determine if I have loaded all the elements? I use the following code. I'm wondering if there is any better solution than this.

Load a list subset with pickle?

2009-10-13 Thread Peng Yu
I use pickle to dump a long list. But when I load it, I only want to load the first a few elements in the list. I am wondering if there is a easy way to do so? Thank you! -- http://mail.python.org/mailman/listinfo/python-list

Re: Load a list subset with pickle?

2009-10-13 Thread Robert Kern
On 2009-10-13 13:00 PM, Peng Yu wrote: I use pickle to dump a long list. But when I load it, I only want to load the first a few elements in the list. I am wondering if there is a easy way to do so? Thank you! Not by pickling the list. However, you can concatenate pickles, so you could just