"C.T. Matsumoto" <c.t.matsum...@gmail.com> wrote
Is it possible to create files containing python code in the same sort of way that you can generate text files.
Yes, a python file is just a text file. There is nothing special about it other than the fact that the contents happen to be Python code.
A simple example perhaps could be a persistent dictionary. Keys and values are written to the dictionary in a file, that can be imported later.
You can do that and in dfact a well known email application does something very similar. However for most situations a proper data storage solution is better (certainly more secure). And for simple cases pickle and shelve(for dictionaries) should suffice. For more complex cases a config file, XML or a relational database would be better. Alan G. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor