Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Models outside TG2
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
James  
View profile  
 More options Jan 28 2010, 12:34 pm
From: James <rent.lupin.r...@gmail.com>
Date: Thu, 28 Jan 2010 09:34:30 -0800 (PST)
Local: Thurs, Jan 28 2010 12:34 pm
Subject: Models outside TG2
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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Fetchinson  
View profile  
 More options Jan 28 2010, 2:31 pm
From: Daniel Fetchinson <fetchin...@googlemail.com>
Date: Thu, 28 Jan 2010 20:31:07 +0100
Local: Thurs, Jan 28 2010 2:31 pm
Subject: Re: [TurboGears] Models outside TG2

> 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?

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James  
View profile  
 More options Jan 28 2010, 4:32 pm
From: James <rent.lupin.r...@gmail.com>
Date: Thu, 28 Jan 2010 13:32:51 -0800 (PST)
Local: Thurs, Jan 28 2010 4:32 pm
Subject: Re: Models outside TG2
Ah, sorry - should have mentioned that I found that page.

It does, indeed, seem to be exactly what I need. Unfortunately,
http://turbogears.org/2.0/docs/_static/wiki20/_download/tg_shell_setu...,
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike C. Fletcher  
View profile  
 More options Jan 28 2010, 4:38 pm
From: "Mike C. Fletcher" <mcfle...@vrplumber.com>
Date: Thu, 28 Jan 2010 16:38:02 -0500
Local: Thurs, Jan 28 2010 4:38 pm
Subject: Re: [TurboGears] Models outside TG2

http://blog.vrplumber.com/index.php?/archives/2384-TurboGears-offline...

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Anthony Theocharis  
View profile  
 More options Jan 28 2010, 5:40 pm
From: Anthony Theocharis <anthony.theocha...@gmail.com>
Date: Thu, 28 Jan 2010 14:40:52 -0800
Local: Thurs, Jan 28 2010 5:40 pm
Subject: Re: [TurboGears] Models outside TG2
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James  
View profile  
 More options Jan 29 2010, 4:10 am
From: James <rent.lupin.r...@gmail.com>
Date: Fri, 29 Jan 2010 01:10:35 -0800 (PST)
Local: Fri, Jan 29 2010 4:10 am
Subject: Re: Models outside TG2
Great! Thanks Anthony, this is just what I was looking for.

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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »