Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #45501

Re: how to run another file inside current file?

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <fjctlzy@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.107
X-Spam-Level *
X-Spam-Evidence '*H*': 0.79; '*S*': 0.00; 'subject:file': 0.07; 'cc:addr:python-list': 0.11; 'subject:run': 0.16; 'possible,': 0.19; 'import': 0.22; 'cc:addr:python.org': 0.22; 'received:192.168.1.100': 0.24; 'file.': 0.24; 'question': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'url:mailman': 0.30; 'file': 0.32; 'run': 0.32; 'another': 0.32; 'url:python': 0.33; 'received:209.85': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'skip:> 10': 0.36; 'url:listinfo': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'received:209': 0.37; 'unable': 0.39; 'url:mail': 0.40; 'how': 0.40; 'easy': 0.60; 'to:addr:gmail.com': 0.65; 'here': 0.66; '>from': 0.68; '8bit%:100': 0.72; 'execution,': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:subject:message-id:from:to:cc:mime-version :content-type:content-transfer-encoding; bh=a96D7fMAYqgeLQJtRm84tDUFwouY8uA8+q/QI13E5sI=; b=h+4Ri1r1HsRtP3F2g0Y42G8mEBFU4Gfp606lfvd1rRAYrmvcGefyveSjpQwWlQmXeo V5/JueTAYBhlV0MkzWybTz+BUNckyO2V3quFsGaY4/vYtBDGF3iDVCaBirv76bX8KMJ+ DQm5cfJyefXxTA2ug7M9xlCnxI1xvsZSwBKKAZiM9/H4QCrFfiOms2iXlKxhLSoKDHvj y0qs2mShVrHdExQ0yFPRtkuLFfcwZ/zf61XopsBl5eydLWbCc7wYHM0dji/yQNSAbSl8 TuVO7jCebg6gZcGgjaxgX6UtIBIz5oyU+S03TVBuS3i6bB7KRSKk5UKwfvi5H2uvwDhS lrBg==
X-Received by 10.66.138.75 with SMTP id qo11mr52335912pab.172.1368873181935; Sat, 18 May 2013 03:33:01 -0700 (PDT)
Date Sat, 18 May 2013 18:32:54 +0800
Subject Re: how to run another file inside current file?
From "fjctlzy@gmail.com" <fjctlzy@gmail.com>
To Avnesh Shakya <avnesh.nitk@gmail.com>
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding base64
Cc python-list@python.org
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 <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1797.1368873192.3114.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1368873192 news.xs4all.nl 15881 [2001:888:2000:d::a6]:55002
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:45501

Show key headers only | View raw


subprocess?



发自我的小米手机

Avnesh Shakya <avnesh.nitk@gmail.com>编写:

>hi,
>   I want to run a another file inside a ached.add_cron_job(..). how is it possible, please help me, I have a file otherFile.py for execution inside current file.
>I know it is very easy question but i m unable to get anything, please help me.
>example --
>
>import otherFile
>from apscheduler.scheduler import Scheduler
>sched = Scheduler()
>sched.start()
>
>def job_function():
>    # Can I here add that file for execution, Or can i add that file directly inside cron?
>   
>sched.add_cron_job(job_function, month='1-12', day='1-31', hour='0-23',minute='44-49')
>-- 
>http://mail.python.org/mailman/listinfo/python-list

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: how to run another file inside current file? "fjctlzy@gmail.com" <fjctlzy@gmail.com> - 2013-05-18 18:32 +0800

csiph-web