[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Maposmatic-dev] [PATCH ocitysmap] Fix: Can now run draw_utils.py from t
From: |
Jeroen van Rijn |
Subject: |
[Maposmatic-dev] [PATCH ocitysmap] Fix: Can now run draw_utils.py from the cli again |
Date: |
Wed, 13 Jan 2010 22:59:23 +0100 |
Added a missing #!, some imports and setting up of i18n and logging.
Running ./draw_utils.py is now again possible to test some key
functionality without being called as a module from ocitysmap proper
Signed-off-by: Jeroen van Rijn <address@hidden>
---
ocitysmap/draw_utils.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
mode change 100644 => 100755 ocitysmap/draw_utils.py
diff --git a/ocitysmap/draw_utils.py b/ocitysmap/draw_utils.py
old mode 100644
new mode 100755
index af6f885..a758337
--- a/ocitysmap/draw_utils.py
+++ b/ocitysmap/draw_utils.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
# -*- coding: utf-8; mode: Python -*-
# ocitysmap, city map and street index generator from OpenStreetMap data
@@ -180,6 +181,11 @@ def add_logo(ctx, paperwidth, paperheight, logo_path,
if __name__ == "__main__":
inner_W, inner_H, margin = 1024, 768, 50
+ import i18n as i
+ import sys
+ i18n = i.install_translation('', '../locale')
+ logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
+
inside_area = cairo.ImageSurface(cairo.FORMAT_RGB24, inner_W, inner_H)
ctx = cairo.Context(inside_area)
--
1.6.3.3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Maposmatic-dev] [PATCH ocitysmap] Fix: Can now run draw_utils.py from the cli again,
Jeroen van Rijn <=