Joined: 04 Jan 2008 Posts: 2622 Location: Maryland
Posted: Fri Apr 03, 2009 12:47 am Post subject: Specify conf file locations on the command line
New functionality in my repo now: Two command-line options that allow you to specify the location(s) of pyTivo's configuration file(s). Mostly these were added for the sake of the Windows Installer, but they can be used on any platform, and they allow for some interesting tricks.
-c or --config: override the default search list with this location
-e or --extraconf: add this location to the search list
If you use -c, then only that path/filename (and any files specified in subsequent -e options) will be checked. If you use -e, it just adds to the existing list of files to check (either the default list, or a list established with -c).
You can combine these, and you can have multiple instances of -e. This becomes useful when you realize how the ConfigParser works: all files found from the list are read. So, you could have partial config files, containing (only) special options to override the defaults, or single shares to use only when needed. Note that if you use this technique, you should probably avoid using the built-in web-based editor, since it will overwrite the last config file found with the complete set of options found/edited. _________________ My pyTivo fork . My page
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum