On Mon, Mar 21, 2011 at 8:11 AM, michael scott <[email protected]>wrote:
> How do I save user created information in python? > As others have mentioned, SQL support is bundled with Python. If your collection of people and their attributes is expected to grow much, that would definitely be how I'd go. However, there's another time-tested option: the config or INI file. Even if you store your data in an SQL database, you might want to keep the connection parameters (how your program talks to that database) in a human-readable format... I also like to keep user preferences (size/location of main window, favorite printer, whatever) in an INI file (I know this isn't universal, but it's how I like to do it - I dabbled in XML config files, but the signal/noise ratio is way too low.) Python comes with the ConfigParser module: http://docs.python.org/library/configparser.html and Michael Foord has an excellent upgrade called ConfigObj: http://www.voidspace.org.uk/python/modules.shtml#configobj
_______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
