[Tutor] Variables

Joel Goldstick joel.goldstick at gmail.com
Tue Aug 2 04:50:21 EDT 2016


On Mon, Aug 1, 2016 at 10:15 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> On Mon, Aug 01, 2016 at 01:26:19PM -0600, Palmer Gutke wrote:
>> I'm trying to write a program w/ python that runs once a day and every time
>> it does it adds 20 to a variable. How do I do this so it doesn't reset the
>> variable to the original value every time I run it?
>
> You have to read the variable from a file saved to disk, add 20, then
> write back to the file.
>
> Does that answer your question? Do you need help reading and writing
> files?
>
>
> --
> Steve
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor

Also, lookup cron.  It will start your program at a certain time you
select, every day

-- 
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays


More information about the Tutor mailing list