X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2eeaec1909452c66566cd99b35bad8abae9ed54f..ea5449ae514c2eba0dae9828cbed53b902b52d89:/wxPython/samples/ide/activegrid/util/__init__.py diff --git a/wxPython/samples/ide/activegrid/util/__init__.py b/wxPython/samples/ide/activegrid/util/__init__.py index 943607976f..e69de29bb2 100644 --- a/wxPython/samples/ide/activegrid/util/__init__.py +++ b/wxPython/samples/ide/activegrid/util/__init__.py @@ -1,48 +0,0 @@ -#---------------------------------------------------------------------------- -# Name: __init__.py -# Purpose: Utilities -# -# Author: Joel Hare -# -# Created: 7/28/04 -# CVS-ID: $Id$ -# Copyright: (c) 2004-2005 ActiveGrid, Inc. -# License: wxWindows License -#---------------------------------------------------------------------------- - -import traceback -import sys -import os - -def isWindows(): - return os.name == 'nt' - -def _generateMainModuleDir(): - if sys.executable.find('python') != -1: - utilModuleDir = os.path.dirname(__file__) - if not os.path.isabs(utilModuleDir): - utilModuleDir = os.path.join(os.getcwd(), utilModuleDir) - mainModuleDir = os.path.normpath(os.path.join(utilModuleDir, os.path.join(os.path.pardir, os.path.pardir))) - if mainModuleDir.endswith('.zip'): - mainModuleDir = os.path.dirname(mainModuleDir) # Get rid of library.zip - else: - mainModuleDir = os.path.dirname(sys.executable) - return mainModuleDir - -mainModuleDir = _generateMainModuleDir() - - -def _generatePythonExecPath(): - if sys.executable.find('python') != -1: - pythonExecPath = sys.executable - else: - pythonExecPath = os.path.join(os.path.dirname(sys.executable), '3rdparty\python2.3\python') - return pythonExecPath - -pythonExecPath = _generatePythonExecPath() - -def getCommandNameForExecPath(execPath): - if isWindows(): - return '"%s"' % execPath - return execPath -