From: WSobczuk <WSobc...@gmail.com>
Date: Sat, 30 Jun 2007 09:08:52 -0000
Local: Sat 30 June 2007 10:08
Subject: Re: running scripts using pylons models
Well, for one thing you didn't do CONFIG.push_process_config(...), so
not everything would work. For another thing - if you change the pylons DB config then you have And the third thing is that it took quiet some time to figure this out Regards, On 30 Cze, 04:52, Contact 42 <contactm...@gmail.com> wrote: > Maybe I'm just not getting it, but this looks really complicated for
> what it's trying to achieve (not the fault of the OP but more so because > of the paste config stuff). > serioiusly, why not just have > appconfig.py > database.py > model.py > Then if you need to use any of this in a script, it's as simple as importing any of these modules into your script. Just plain python. Nothing special. > Huy > > Hello, > > I just wasted around 5 hours trying to figure out how to run a job > > Regards, > > from sqlalchemy import * > > config_file = sys.argv[1] > > conf = appconfig('config:'+config_file) > > pkg = __import__(package, globals(), locals(), [func]) 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.
| ||||||||||||||