On Oct 15, 5:15 pm, Mike Orr <[email protected]> wrote: > On Thu, Oct 15, 2009 at 3:56 PM, john smallberries > > <[email protected]> wrote: > > > I'd like to do a slightly different application startup for paster > > shell than with paster serve. I'd rather not do that by having > > separate config files. Is there a way within make_app or > > load_environment to know how I'm being run, or to plumb a command-line > > argument for use down there? > > I don't see any flag that tells this. The shell is implemented by > ``pylons.commands.ShellCommand``. It could set a config flag there > but as far as I can tell it doesn't. You have a few choices off the > top of my head: > > - Set the '-d' option when running shell, and check if it's present in > sys.argv. (Shell has a '-d' option but serve doesn't.)
Doesn't sys.argv contain the command name? Something like: ['./bin/paster', 'shell', 'ini/test.ini'] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
