Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'value,': 0.04; 'api.': 0.05; 'configure': 0.05; 'elegant': 0.07; 'app,': 0.09; 'currently,': 0.09; 'subject:skip:c 10': 0.09; 'python': 0.11; 'app': 0.19; 'file,': 0.19; 'this?': 0.23; 'message- id:@mail.gmail.com': 0.30; 'file': 0.32; 'thanks!': 0.32; 'running': 0.33; 'received:google.com': 0.35; 'add': 0.35; 'there': 0.35; 'data,': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'read': 0.60; 'provide': 0.64 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=/Ocvqt+2ww9BrKijq+TgMSa/wt4Nf4VaKm0F6+sN6Gg=; b=vTFRZwM6OZq3lt2xyKnQ2HzdR7x4MbL5yLsJZSkg9y3Yq6uBbpsL8RfWTHeRW3f+VX o+8NO+tmIdp0Ah3lN9Uf45m5H2G5495Quoq6DbfDLkLGiuxdHxj1z5HXrHC86rCm0pJY tigb0B64PZjZb9SX726ZBcn3Kn0M035up8EXhOhl5ukF+V+p7jIQ3E7x+uHFINThg79V yvqIEVsaL3uZw5R+z+toYvNcKU2JribyojFc467fQZWwEuKkUdUY3Qa1bO40ESD1y5mJ J9Kdre4w2/V4swVJk03t3yH0KaNa2MR3SiMie4VddDPxgG490QsV++2e9FgQDzIEKPFe tbaQ== MIME-Version: 1.0 X-Received: by 10.152.120.134 with SMTP id lc6mr11229002lab.72.1427340372081; Wed, 25 Mar 2015 20:26:12 -0700 (PDT) Date: Thu, 26 Mar 2015 11:26:12 +0800 Subject: What is elegant way to do configuration on server app From: Jerry OELoo To: python-list@python.org Content-Type: text/plain; charset=UTF-8 X-Mailman-Approved-At: Thu, 26 Mar 2015 09:19:17 +0100 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.19 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1427357959 news.xs4all.nl 2904 [2001:888:2000:d::a6]:57423 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:88032 Hi. I have used python to provide a web service app, it will running 7*24, and it will return some data to client by API. Now I want to add some extra data in return data, ex, "status = 1", and I want this value 1 can be configured, that means I can control that service app return status with 0, 1 or other value, and I want to keep service running always. Currently, I can just think out that I put status into a configure file, and service schedule read this file and get status value, Is there any other elegant way to achieve this? What is standard way in python for this requirement? Thanks! Best Regards Jerry -- Rejoice,I Desire!