If I understand your question, James, you might want something like I've been using:

http://pastebin.ca/1769952

If you find it useful, let me know, and I'll stick the reference up in a more permanent location.

-- Anthony

On 28-Jan-10, at 1:38 PM, Mike C. Fletcher wrote:
James wrote:
Hello all,
What's the easiest way to recreate the environment created by "paster
shell"?

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://blog.vrplumber.com/index.php?/archives/2384-TurboGears- offline-processes-crons,-command-line-commands,-etc.html

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

--
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to