Checkout
Greg Stein
committed
on 14 Feb 09
Clean up the Python used in transform_sql.py, and make it even easier to
use than r35853 (ie. not forced to provide an output file).

* buil… Show more
Clean up the Python used in transform_sql.py, and make it even easier to

use than r35853 (ie. not forced to provide an output file).

* build/transform_sql.py:

 (): use consistent string quoting throughout the file (single quotes)

 (usage_and_exit): use a more conventional output form, signifying the

   variable values, and that brackets mean "optional". detail the option.

   remove a useless backslash.

 (main): revise args to take file handles rather than names. use a single

   re.sub() rather than a couple replace() calls to turn the filename

   into a variable name. in the output, note the user should be running

   gen-make.py (on Windows, where this script is used). remove an unused

   replace() of newlines (the're all gone after the split()), and

   simplify the hell out of the "got non-whitespace?" test.

 (): adjust the sys.argv handling.

* build/transform_sql.sh: add a comment to fix emacs syntax coloring

* build/generator/gen_win.py:

 (WinGeneratorBase._create_sqlite_headers): adjust parameters for

   transform_sql.main()

Show less