[Tutor] conventions for establishing and saving default values for variables

Hugo Arts hugo.yoshi at gmail.com
Tue Jun 15 15:04:55 CEST 2010

On Tue, Jun 15, 2010 at 2:27 PM, Pete O'Connell <pedrooconnell at gmail.com> wrote:
> Hi I was wondering if anyone could give me some insight as to the best way
> to get and save variables from a user the first time a script is opened. For
> example if the script prompts something like "What is the path to the
> folder?" and the result is held in a variable called thePath, what is the
> best way to have that variable saved for all subsequent uses of the script
> by the same user.
> Pete

In UNIX-likes, It would be a configuration file in their home
directory, I suppose. Under windows, probably the registry. There's
the _winreg and configparser modules.


More information about the Tutor mailing list