Constants.py

Go to the documentation of this file.
00001 """
00002 Copyright 2008 Free Software Foundation, Inc.
00003 This file is part of GNU Radio
00004 
00005 GNU Radio Companion is free software; you can redistribute it and/or
00006 modify it under the terms of the GNU General Public License
00007 as published by the Free Software Foundation; either version 2
00008 of the License, or (at your option) any later version.
00009 
00010 GNU Radio Companion is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License
00016 along with this program; if not, write to the Free Software
00017 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
00018 """
00019 ##@package grc_gnuradio.Constants
00020 #Global constants for grc gnuradio package
00021 #@author Josh Blum
00022 
00023 import os
00024 import sys
00025 import stat
00026 
00027 ##The default binary to execute python files.
00028 PYEXEC = 'python'
00029 #>>> platform dependency! MacOS requires pythonw to run wx apps #
00030 if sys.platform == 'darwin': PYEXEC = 'pythonw'
00031 
00032 #setup paths
00033 DATA_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'data')
00034 BLOCK_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'blocks')
00035 HIER_BLOCKS_LIB_PATH = os.path.join(os.path.expanduser('~'), '.grc_gnuradio')
00036 
00037 #file creation modes
00038 TOP_BLOCK_FILE_MODE = stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP | stat.S_IROTH
00039 HIER_BLOCK_FILE_MODE = stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IWGRP | stat.S_IROTH
00040 
00041 #data files
00042 FLOW_GRAPH_TEMPLATE = os.path.join(DATA_PATH, 'flow_graph.tmpl')
00043 BLOCK_DTD = os.path.join(DATA_PATH, 'block.dtd')
00044 BLOCK_TREE = os.path.join(DATA_PATH, 'block_tree.xml')
00045 DEFAULT_FLOW_GRAPH = os.path.join(DATA_PATH, 'default_flow_graph.grc.xml')
00046 

Generated on Sat Aug 23 02:00:11 2008 for GNU Radio Companion by  doxygen 1.5.4