I need to run a few non-trivial scripts which use the TG configuration
and model; having to do "paster shell <myscript.py" would be really
awkward as I want to pass in command line arguments to my script.
It seems the pieces I need are the locating and reading-in of a
configuration file and the creation of a SQLAlchemy engine I can pass
to model.init_model.
Any suggestions?
James
http://www.google.com/search?q=models+outside+tg2
And you are feeling lucky :)
HTH,
Daniel
--
Psss, psss, put it down! - http://www.cafepress.com/putitdown
It does, indeed, seem to be exactly what I need. Unfortunately,
http://turbogears.org/2.0/docs/_static/wiki20/_download/tg_shell_setup.py,
which purports to hold the magic, is an empty file...
Does tg_shell_setup.py exist anywhere else?
Thanks!
James
On Jan 28, 8:31 pm, Daniel Fetchinson <fetchin...@googlemail.com>
wrote:
The tgcommand.py module should show up in TG 2.1, its waiting on my
getting documentation written up in RST format.
HTH,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
If you find it useful, let me know, and I'll stick the reference up
in a more permanent location.
-- Anthony
I added one more thing to get the logging set up as specified in the
configuration file:
from paste.script import command
cmd = command.Command('dummy')
cmd.logging_file_config(my_ini_file)
Pretty hacky, but it works... Any improvements gladly accepted.
James
On Jan 28, 11:40 pm, Anthony Theocharis <anthony.theocha...@gmail.com>
wrote: