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


Groups > comp.lang.python > #34511

Re: Running a Python app on a remote server and displaying the output files

Path csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'configure': 0.04; 'output': 0.04; 'root': 0.04; 'subject:Python': 0.05; 'dynamically': 0.07; 'python': 0.09; 'directory)': 0.09; 'solution,': 0.09; 'subject:files': 0.09; 'url:github': 0.09; '2.7': 0.13; 'files.': 0.13; 'dec': 0.15; 'file,': 0.15; 'server,': 0.15; "(i'm": 0.16; '(within': 0.16; 'csv': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'index.html': 0.16; 'locally,': 0.16; 'script.)': 0.16; 'url:py': 0.16; 'wrote:': 0.17; 'instance': 0.17; 'instance,': 0.17; 'app': 0.19; 'trying': 0.21; 'work.': 0.23; "haven't": 0.23; "i've": 0.23; 'host': 0.24; 'script': 0.24; 'allows': 0.25; 'tried': 0.25; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'message- id:@mail.gmail.com': 0.27; 'actual': 0.28; 'run': 0.28; 'hosting': 0.28; '(maybe': 0.29; 'publicly': 0.29; "i'm": 0.29; 'designated': 0.30; 'figure': 0.30; 'server.': 0.32; 'file': 0.32; 'running': 0.32; 'accessible': 0.33; 'to:addr:python-list': 0.33; 'tutorial': 0.33; 'another': 0.33; 'skip:d 20': 0.34; "can't": 0.34; 'received:google.com': 0.34; 'jason': 0.35; 'received:209.85.220': 0.35; 'remote': 0.35; 'received:209.85': 0.35; 'next': 0.35; 'but': 0.36; "didn't": 0.36; 'anything': 0.36; 'should': 0.36; 'possible': 0.37; 'drop': 0.37; 'received:209': 0.37; 'well.': 0.37; 'subject:: ': 0.38; 'store': 0.38; 'files': 0.38; 'things': 0.38; 'to:addr:python.org': 0.39; 'google': 0.39; 'header:Received:5': 0.40; 'end': 0.40; 'your': 0.60; 'address': 0.60; 'you.': 0.61; 'world': 0.63; 'more': 0.63; 'within': 0.64; 'night,': 0.65; 'home': 0.66; 'secure': 0.67; 'box,': 0.69; 'sounds': 0.71
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=7k7qaGfVo7qeL3f5k6mki0rBzoO+DNz8ocZkfnEOeSw=; b=KS3vDfoh/Q27hccfSl22RRYiAnwcFM5JypKx4k2YN00B0L9LuJCcG4A51JUa5LS0z+ jZNkyPBWCBBg1FJppjoIKiFAPgzYJ5GgWXKKK9g6mcbT0g60O4MrcHBD27NuZWemENVB RenRVxN/kNy0SXjhiBZjheD+EkeHX3e9gGJ6XA/3ZT5vkUjWoFBVEgUt8BC5YeSILCaC s76lmuDQ4MJC0vc8DjQovQquNlyKQ8qcXlZOLZF+FtnRG+Y/Dkyr5WaTrO2lTaTvEDW2 HTsTAd22c7wpWX7owrqUHPco+9+/M2uJVc9pGkYrG8g2eXYbIykFtqz03wU6t6gqTJbu ZwwA==
MIME-Version 1.0
In-Reply-To <b2f59c32-e503-46ae-8605-0cb916dd8c04@googlegroups.com>
References <b2f59c32-e503-46ae-8605-0cb916dd8c04@googlegroups.com>
Date Sun, 9 Dec 2012 11:38:26 +1100
Subject Re: Running a Python app on a remote server and displaying the output files
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
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.637.1355013509.29569.python-list@python.org> (permalink)
Lines 47
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1355013509 news.xs4all.nl 6881 [2001:888:2000:d::a6]:41181
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:34511

Show key headers only | View raw


On Sun, Dec 9, 2012 at 7:22 AM, Jason Hsu <jhsu802701@gmail.com> wrote:
> I have a Python 2.7 script at https://github.com/jhsu802701/dopplervalueinvesting . When I run the screen.py script locally, the end result is a new screen-output sub-directory (within the root directory) and a results.csv file within it.
>
> What I'm trying to do is put this script on a remote server, run this screen.py script every night, and make the results.csv file publicly readable.

Sounds like a cron job and a web server.

> I've tried to do this on Google App Engine, but I can't get it to work. The Google App Engine tutorial revolves around trying to dynamically create a web site, and I haven't been able to figure out how to make anything other than an index.html file in the root directory work. HOW DO I MAKE OTHER FILES PUBLICLY READABLE?

I don't know Google App Engine, but the normal way to do these things
is to simply drop a file into your web server's designated root - for
instance, /var/www/results.csv would be accessible as
http://yourserver/results.csv - just put it next to index.html. But
you may need to configure it, if it's set to a more secure default
setup that allows only html files.

> 1. How do I run my Python script in Google App Engine and make the output results.csv file publicly available?
> 2. If Google App Engine isn't the solution for me, should I use WebFaction? (I already tried Heroku, and it didn't work for me.)
> 3. What are my other options?
>
> I'm willing to pay for a solution, but only if I get web hosting as well. (I'm not willing to pay for MDDHosting for my dopplervalueinvesting.com web site AND another host for running my script.)

Here's a possible solution for you. Make your screen.py web-accessible
(maybe with a password or IP address check, if you don't want it
public) as your means of regenerating the file, and create another one
that returns it. You can then have a cron job on any other computer in
the world - your own home box, for instance - that runs:

wget http://yourserver/screen.py

You can store the csv file as an actual file, or in a database, or
whatever's convenient. You just need the other script to be able to
find it.

ChrisA

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


Thread

Running a Python app on a remote server and displaying the output files Jason Hsu <jhsu802701@gmail.com> - 2012-12-08 12:22 -0800
  Re: Running a Python app on a remote server and displaying the output files Chris Angelico <rosuav@gmail.com> - 2012-12-09 11:38 +1100
  Re: Running a Python app on a remote server and displaying the output files Miki Tebeka <miki.tebeka@gmail.com> - 2012-12-09 08:27 -0800

csiph-web