You could check which modules are imported... the pserve script is loading stuff from paste.deploy so these modules should be present in sys.modules
On 29.07.2015 14:06, 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? I'm launching a background thread from there, which does some regular > polling of a 3rd-party API. Obviously I > don't want to start that thread when the application is launched from pshell, > but I don't see an easy way to prevent that. > > Thanks and best regards, > Martin > > -- > 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] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at http://groups.google.com/group/pylons-discuss. > For more options, visit https://groups.google.com/d/optout. -- 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.
