diff tools/area_editor.py @ 71:c449a3507a6b

Shebang and path hacking, so that the area_editor runs
author Stefano Rivera <stefano@rivera.za.net>
date Sun, 01 Sep 2013 21:39:16 +0200
parents 1261c0731385
children 5db052531510
line wrap: on
line diff
--- a/tools/area_editor.py	Sun Sep 01 21:32:28 2013 +0200
+++ b/tools/area_editor.py	Sun Sep 01 21:39:16 2013 +0200
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
 # The basic area editor
 #
 # To edit an existing level, use
@@ -9,15 +11,18 @@
 # (size specified in pixels
 #
 
+import os
+import sys
+
 import pygame
 import pygame.locals as pgl
 
+sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
+
 from nagslang.resources import resources
 from nagslang.constants import SCREEN, FPS
 from nagslang.level import Level, POLY_COLORS
 
-import sys
-
 
 class EditorLevel(Level):