Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #76811
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <travisgriggs@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.032 |
| X-Spam-Evidence | '*H*': 0.94; '*S*': 0.00; 'insert': 0.05; 'init': 0.07; 'prototyping': 0.07; 'python3': 0.07; 'performs': 0.09; 'skip:/ 10': 0.09; 'statements': 0.09; 'python),': 0.16; 'script,': 0.16; 'stage.': 0.16; 'stdout': 0.16; 'subject:between': 0.16; 'properly': 0.19; 'command': 0.22; "i've": 0.25; 'logging': 0.26; 'header:In-Reply-To:1': 0.27; 'there.': 0.32; 'run': 0.32; 'linux': 0.33; 'running': 0.33; 'minimal': 0.33; 'could': 0.34; 'problem': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'acceptable': 0.36; 'curious': 0.36; 'done': 0.36; 'subject:?': 0.36; 'half': 0.37; 'message- id:@gmail.com': 0.38; 'to:addr:python-list': 0.38; 'embedded': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'first': 0.61; 'making': 0.63; 'header:Message-Id:1': 0.63; 'size.': 0.65; 'charset:windows-1252': 0.65; 'managing': 0.66; 'haven\x92t': 0.84; 'i\x92d': 0.84; 'semi': 0.84; 'device.': 0.93; 'technique': 0.93 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=WSFk943OgdTh5axq8gLFYa7EGnTXrf0N0BITEqenCr0=; b=E/A+no9Wdut5NSkri9hM6wiHY7zhPC7Xq0+Jt3MxXkb6UzZTVfHca80tKGySCxl+Rj Sgd2RuM128eKXr8kxGIfTBc27+NdbilQ3CXBFG5Raokzlrj4vb5U1YQtL6lpsr6/dcMW o9uI2CBM+3/wa4o4A3C2URL4TVKlY0q9iduqGKhdH4yTHxZ3nF4drfY9AKgBySLtsA3G pnYaL2ocF+r/xWLAkYozCW3F7sQ0R+P8vMMAk9V5AuHS9aNOx9rUsHMSvcIr8gjlgH2Z rZxOizRayzEu+awhZhH1kg2CVKwYRXpbSKMMWq09VksDQ5mCVFU8Lz9Zmqk/Svu2XPKO Wuhg== |
| X-Received | by 10.70.30.132 with SMTP id s4mr8636125pdh.96.1408735678649; Fri, 22 Aug 2014 12:27:58 -0700 (PDT) |
| Content-Type | text/plain; charset=windows-1252 |
| Mime-Version | 1.0 (Mac OS X Mail 7.3 \(1878.6\)) |
| Subject | Halfway point between interactive and daemon? |
| From | Travis Griggs <travisgriggs@gmail.com> |
| In-Reply-To | <0f0ef37d-7d09-483f-8f9b-c63c444f1ea7@googlegroups.com> |
| Date | Fri, 22 Aug 2014 12:27:55 -0700 |
| Content-Transfer-Encoding | quoted-printable |
| References | <CAKUKWzmnnrpm-9SVNAFu3G9vYf2w0ewAhnGeOge8B2NsDujamQ@mail.gmail.com> <CAPTjJmrO7fER7Wjgo6qNO9qHNJgkJ7Y3BFWBf1L=t-bOv4JV7w@mail.gmail.com> <53F634E5.4020206@m4x.org> <mailman.13263.1408667169.18130.python-list@python.org> <0f0ef37d-7d09-483f-8f9b-c63c444f1ea7@googlegroups.com> |
| To | python-list@python.org |
| X-Mailer | Apple Mail (2.1878.6) |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.13302.1408735687.18130.python-list@python.org> (permalink) |
| Lines | 22 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1408735687 news.xs4all.nl 2978 [2001:888:2000:d::a6]:47471 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:76811 |
Show key headers only | View raw
I have a python3 program that performs a long running service on a semi embedded linux device. I've been in the prototyping stage. I just run it from the command line and use print() statements to let me know the thing is making acceptable process. At some point, I need to properly daemonize it. Write an init script, find a logging framework/module, batton all the hatches down, so to speak. I’m curious if there’s a technique one could use to get half way there. Basically, with minimal modifications, I’d like to get it running at startup. So I can put a line like this in rc.local nohup python3 myMain.py 2>&1 > /var/log/mylog.log & Then I can “check” on it when I need to with a tail -f /var/log/mylog.log. But then I have the problem of managing the log size. And also I either have to wait for stdout to flush, or insert sys.stdout.flush() after any of my print()’s. I haven’t done a lot of these daemon processes (and this is my first with python), so I was curious what those with experience do here.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Python vs C++ Chris Angelico <rosuav@gmail.com> - 2014-08-22 10:26 +1000
Re: Python vs C++ CHIN Dihedral <dihedral88888@gmail.com> - 2014-08-22 12:00 -0700
Halfway point between interactive and daemon? Travis Griggs <travisgriggs@gmail.com> - 2014-08-22 12:27 -0700
Re: Halfway point between interactive and daemon? Marko Rauhamaa <marko@pacujo.net> - 2014-08-22 22:49 +0300
Re: Halfway point between interactive and daemon? Chris Angelico <rosuav@gmail.com> - 2014-08-23 06:32 +1000
csiph-web