On Thu, Oct 15, 2009 at 3:56 PM, john smallberries <welch.quietple...@gmail.com> 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.) Set an environment variable and look for it in os.environ. This is the age-old workaround for programs that don't let you customize the command-line options. If you have IPython installed, "paster shell" will use it. Maybe you can initialize something in your IPython configuration that you can see in environment.py. (Note: the '-d' option disables IPython.) -- Mike Orr <sluggos...@gmail.com> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---