Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on simple application for Ubuntu App Showdown. I'm relatively new to programming (started learning Python last week), so maybe this question sounds stupid.

Anyway, lets say there's a variable which the user can change. Lets say its users name. How can I store it, so after next run of the program, this name will be displayed? Can I write changes to the file with the variable or do I need to create special file where I can write changes?

I use Quickly for the record.

share|improve this question
up vote 2 down vote accepted

You need to save it in database or in a simple textfile(if it is small project) . I hope you already learned filemanagement in python

share|improve this answer
Thanks for the answer. I think the text file will be enough. I don't know where that file should be stored. Should it be in hidden folder (for example .my-app) in user directory or somewhere in /opt together with other files from my application? – mivoligo Jun 21 '12 at 14:08
It is better to store user data and user configurations in .appname folder in home directory . You should save global settings in /opt – Tachyons Jun 21 '12 at 14:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.