Updating application

Before we can call our new function from Application, we need to implement a way to create a CSV extract of the daily data. This will be used by more than one function, so we'll implement it separately from the function that calls the upload code. Follow along with these steps:

  1. To begin, we'll need a temporary location to store our generated CSV file.  The tempfile module includes functions to work with temporary files and directories; we'll import mkdtemp(), which will give us a name for a platform-specific temporary directory.:
from tempfile import mkdtemp
Note that mdktemp() doesn't actually create a directory; it merely provides an absolute path to a randomly named directory in the platform's preferred temp file ...

Get Python GUI Programming with Tkinter now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.