Re: Issue with continous incrementing of unbroken sequence for a entire working day

2013-02-28 Thread Vytas D.
Hi, If you want to have one program running forever and printing sales_records, you would do (one of the possibilities) something like this: def salesrecord(serial_number): for i in salesrecord: print first_sales_record serial_number += 1 print serial_number return

Re: "Daemonizing" an application.

2013-02-27 Thread Vytas D.
Hello, Just recently learned about memory-mapped files (module mmap). If two processes open the same file, this file is mapped for both processes. So at the same time the same memory space can be accesses by two processes. The documentation stated that memory-mapped files can (and are) used for in

Re: yield expression

2013-02-26 Thread Vytas D.
+= 1 def main(): generator = counter() while True: print(next(generator)) if __name__ == '__main__': main() Hope helps. Vytas D. On Tue, Feb 26, 2013 at 4:34 PM, Colin J. Williams wrote: > On 24/02/2013 7:36 PM, Ziliang Chen wrote: > >> Hi folk

Re: Small program ideas

2013-02-26 Thread Vytas D.
.. irrational number, including π, can be represented by an infinite series of nested fractions...". So it won't be very complicated to implement. 6. Implement dos2unix/unix2dos 7. Calculator, that gets a string, put data into a tree and after calculates the value. Vytas D. On Tue,