Re: Stopping an iterator and continuing later

2017-11-27 Thread nospam . Gregory Ewing
november nihal wrote: > I should have added I switch off the machine when I stop. ( I dont have options > to keep it in a sleep mode or in hibernation ) The iterator returned by itertools.combinations is pickleable: >>> from pickle import dumps, loads >>> from itertools import combinations >>

Re: Stopping an iterator and continuing later (Posting On Python-List P

2017-11-27 Thread november nihal
On Saturday, 25 November 2017 20:59:02 UTC, Lawrence Dâ ÖOliveiro wrote: > On Sunday, November 26, 2017 at 6:43:05 AM UTC+13, novembe...@gmail.com wrote: > > I worked out how to use iterators to generate values one at a time > > then ran into a second problem which is time. Is it possible to > > s

Re: Stopping an iterator and continuing later

2017-11-26 Thread Gregory Ewing
november nihal wrote: I should have added I switch off the machine when I stop. ( I dont have options to keep it in a sleep mode or in hibernation ) The iterator returned by itertools.combinations is pickleable: >>> from pickle import dumps, loads >>> from itertools import combinations >>> c

Re: Stopping an iterator and continuing later (Posting On Python-List P

2017-11-26 Thread november nihal
On Saturday, 25 November 2017 20:59:02 UTC, Lawrence Dâ ÖOliveiro wrote: > On Sunday, November 26, 2017 at 6:43:05 AM UTC+13, novembe...@gmail.com wrote: > > I worked out how to use iterators to generate values one at a time > > then ran into a second problem which is time. Is it possible to > > s

Re: Stopping an iterator and continuing later

2017-11-26 Thread Stefan Ram
r...@zedat.fu-berlin.de (Stefan Ram) writes: >Then you can use pickle or custom methods to save and >restore the object, or get the state from an iterator >and create a new iterator with that state later. One does not always have to write a custom class, for example: main.py import pickle

Re: Stopping an iterator and continuing later

2017-11-26 Thread Stefan Ram
r...@zedat.fu-berlin.de (Stefan Ram) writes: >Then you can use pickle or custom methods to save and >restore the object, or get the state from an iterator >and create a new iterator with that state later. One does not always have to write a custom class, for example: main.py import pickle

Re: Stopping an iterator and continuing later (Posting On Python-List P

2017-11-26 Thread november nihal
On Saturday, 25 November 2017 20:59:02 UTC, Lawrence Dâ ÖOliveiro wrote: > On Sunday, November 26, 2017 at 6:43:05 AM UTC+13, novembe...@gmail.com wrote: > > I worked out how to use iterators to generate values one at a time > > then ran into a second problem which is time. Is it possible to > > s

Re: Stopping an iterator and continuing later (Posting On Python-List Prohibited)

2017-11-26 Thread november . nihal
On Saturday, 25 November 2017 20:59:02 UTC, Lawrence D’Oliveiro wrote: > On Sunday, November 26, 2017 at 6:43:05 AM UTC+13, novembe...@gmail.com wrote: > > I worked out how to use iterators to generate values one at a time > > then ran into a second problem which is time. Is it possible to > > sav