source: branches/active/character_customization/game/parpg_editor.py @ 833

Revision 797, 1.2 KB checked in by aspidites, 7 years ago (diff)

Patch by Aspidites:

  • converted print statements to logging messages.
  • all of parpg's log messages go to the same file, but are differenciated by their class names
  • need to find a way to manipulate fife's log level
  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1#!/usr/bin/env python2
2
3#   This file is part of PARPG.
4#   PARPG is free software: you can redistribute it and/or modify
5#   it under the terms of the GNU General Public License as published by
6#   the Free Software Foundation, either version 3 of the License, or
7#   (at your option) any later version.
8#
9#   PARPG is distributed in the hope that it will be useful,
10#   but WITHOUT ANY WARRANTY; without even the implied warranty of
11#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12#   GNU General Public License for more details.
13#
14#   You should have received a copy of the GNU General Public License
15#   along with PARPG.  If not, see <http://www.gnu.org/licenses/>.
16
17import os
18import sys
19
20"""
21This runs the editor in ..\tools\map_editor\run.py
22"""
23
24if __name__ == '__main__':
25    parpg_path = os.path.split(os.path.realpath(sys.argv[0]))[0]
26    parpg_dir = parpg_path.split('/')[-1]
27
28    args = [sys.executable, './run.py']
29
30    if len(sys.argv) > 1:
31        map_path = sys.argv[1]
32
33        args.append(os.path.join('..', parpg_dir, map_path))
34
35    fife_editor_path = os.path.join(parpg_path, '..', 'tools', 'map_editor')
36    os.chdir(fife_editor_path)
37    os.execv(args[0], args)
Note: See TracBrowser for help on using the repository browser.