I like the sys.argv[0]-approach: It's simple and readable. Should have 
thought of it myself.
And longer term I should probably switch to an approach with a separate 
daemonized process (using Pyramid's command-line helpers).

Thanks both of you.

Am Mittwoch, 29. Juli 2015 14:39:38 UTC+2 schrieb Gael Pasgrimaud:
>
>
>
> On Wednesday, July 29, 2015 at 2:06:29 PM UTC+2, Martin Stein wrote:
>>
>> Hi all,
>>
>> is there an elegant way in the central main(..)-function to determine if 
>> the application was started from pserve or pshell? 
>>
>
> Don't know if it's elegant but sys.argv[0].endswith('pshell') is true when 
> you are using pshell
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to