From 6914187e0be2270307a9467247635e2fbd154c45 Mon Sep 17 00:00:00 2001 From: Jean-Francois Doyon Date: Wed, 22 Mar 2006 02:41:13 +0000 Subject: [PATCH] - Remove the python interpreter from the script, have the user supply it instead - Add a little README.txt --- demo/python/README.txt | 22 ++++++++++++++++++++++ demo/python/rundemo.py | 10 ++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 demo/python/README.txt diff --git a/demo/python/README.txt b/demo/python/README.txt new file mode 100644 index 000000000..0963e4f27 --- /dev/null +++ b/demo/python/README.txt @@ -0,0 +1,22 @@ +# $Id$ + +This directory contains a sample python script implementing the Mapnik API. + +The script is thoroughly commented and also acts as a mini tutorial. Reading +it should get you on your way, and you can use it as a base for your work. + +You must compile and install mapnik and the python bindings FIRST. + +Once this is done, run it: + +/path/to/python rundemo.py + +If all goes well, it should render 2 map images: + +demo.jpg +demo.png + +Have a look! + +Cheers, +J.F. diff --git a/demo/python/rundemo.py b/demo/python/rundemo.py index d09a3fe4b..578d51f64 100644 --- a/demo/python/rundemo.py +++ b/demo/python/rundemo.py @@ -1,5 +1,5 @@ -#!/usr/bin/python2.3 - +# $Id$ +# # This file is part of Mapnik (c++ mapping toolkit) # Copyright (C) 2005 Jean-Francois Doyon # @@ -294,3 +294,9 @@ m.zoom_to_box(Envelope(7622019.99659767, 2966323.17001496, 7909470.44644348, 275 render_to_file(m, 'demo.png', 'png') render_to_file(m, 'demo.jpg', 'jpeg') + +print """\n\nTwo maps have been rendered in the current directory: +- demo.jpg +- demo.png + +Have a look!\n\n"""