log file.

Joel Goldstick joel.goldstick at gmail.com
Tue Jun 14 16:23:57 EDT 2016


On Tue, Jun 14, 2016 at 4:14 PM, Paul Owen <owenpaul.po at gmail.com> wrote:
> thanks I will look at them.
> --
> https://mail.python.org/mailman/listinfo/python-list


If your program is called 'my_program.py'  you can write print
statements (or print functions in python 3) and when you run your
program, those prints will show on your screen.  If you want to save
them to a log file do this:

python my_program.py >> my_log_file.log

When your program ends, open up my_log_file.log to see what happened.
The two > characters will write to the file if it is new, or append to
the file if it exists


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



More information about the Python-list mailing list