Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Python writing onto itself. Is it possible?

Status
Not open for further replies.

bbelt

Programmer
Dec 20, 2005
3
US
This question is actually a two part scenario but still under the same question so please stay with me.
1) I have a tool tip like window that pops up on start up giving the user tips. It has an option if the user would like to turn it on or off. Right now, the option is controlled by a text file with one value in it, 1 or 0. I would like to get rid of this file if possible and have this option changed within the code itself.
2) The same program keeps data within an excel spreedsheet. The problems with it is that not everyone who uses the program has excel. Can data similar to excell be written and updated within the code itself(in the form of lists and dictionaries) and do away with the need for excel.
 
I think the best thing for controlling the tooltip option would be to create a configuration dictionary that has data on all the configuration settings for the program. Then pickle it and save it. This will maintain persistence of data that you need. The same thing can be done to store the program data without resorting to Excel.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top