dogtail.config rewrite (slight API change)



Hi folks,

I just committed a rewritten dogtail.config module with a slightly
changed API. Instead of rewriting my (rather large) commit message, I
decided to just forward it to the affected lists. You only need to read
the commit message for dogtail/config.py (the longest one).

Cheers,
Zack
--- Begin Message ---
CVSROOT:	/cvs/gnome
Module name:	dogtail
Changes by:	zcerza	05/10/27 16:51:31

Modified files:
	.              : ChangeLog 
	dogtail        : config.py logging.py procedural.py tc.py 
	                 tree.py utils.py 
	examples       : firefox-test-browsing-local-html-file.py 
	                 gcalctool-test-fibonacci.py 
	                 gedit-test-utf8-procedural-api.py 
	                 gnome-panel-test-starting-every-app.py 
	                 google-search.py 
	                 nautilus-test-icon-view-collage.py 
	examples/data  : sample.cfg 

Log message:
* dogtail/config.py: Rewrite. Rename the Config class to _Config, and provide
a singleton instance named config. It is no longer necessary to instantiate a
_Config instance in any script, whereas previously it was necessary to do so
if any values needed to be changed. Also rename logdir to logDir, scratch to
scratchDir, and data to dataDir. When the *Dir values are changed, the new
directory is created instantly if it does not exist.	NOTE: this is an API
change. Updating any scripts should be as simple as replacing 'Config' with
'config', 'logdir' with 'logDir', 'scratch' with 'scratchDir', 'data' with
'dataDir' and removing any instantiations of the old Config class. Also, the
old way of loading configuration values from a file is no longer supported.
The current preferred method is to create a Python file that contains
something like: "from dogtail.config import config; config.logDir =
'../logs/'; config.debugSearching = True" and then import that file from
whatever scripts need it.

* dogtail/logging.py, dogtail/tc.py, dogtail/tree.py,
examples/firefox-test-browsing-local-html-file.py,
examples/gcalctool-test-fibonacci.py,
examples/gedit-test-utf8-procedural-api.py,
examples/gnome-panel-test-starting-every-app.py, examples/google-search.py,
examples/nautilus-test-icon-view-collage.py, examples/data/sample.cfg: Update
to new config API.

* dogtail/procedural.py: Update to new config API. Also, change "def
run(application, arguments = None, appName = None):" to "def run(application,
arguments = '', appName = ''):".

* dogtail/utils.py: Update to new config API. Also, make run()'s appName
argument default to "''" instead of "None", just like
dogtail.procedural.run(). Also, make run() use doDelay() instead of sleep() to
get logging for free via the config.config.debugSearching option.

URL : http://cvs.gnome.org/bonsai/cvsquery.cgi?branch=&dir=dogtail&who=zcerza&date=explicit&mindate=2005-10-27%2016:50&maxdate=2005-10-27%2016:52

_______________________________________________
cvs-commits-list mailing list
cvs-commits-list gnome org
http://mail.gnome.org/mailman/listinfo/cvs-commits-list

--- End Message ---


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]