summaryrefslogtreecommitdiff
path: root/gr-utils/src/python/modtool
diff options
context:
space:
mode:
Diffstat (limited to 'gr-utils/src/python/modtool')
-rw-r--r--gr-utils/src/python/modtool/cmakefile_editor.py2
-rw-r--r--gr-utils/src/python/modtool/modtool_add.py2
-rw-r--r--gr-utils/src/python/modtool/modtool_newmod.py2
-rw-r--r--gr-utils/src/python/modtool/templates.py6
4 files changed, 5 insertions, 7 deletions
diff --git a/gr-utils/src/python/modtool/cmakefile_editor.py b/gr-utils/src/python/modtool/cmakefile_editor.py
index fe50373bb..b18275707 100644
--- a/gr-utils/src/python/modtool/cmakefile_editor.py
+++ b/gr-utils/src/python/modtool/cmakefile_editor.py
@@ -5,7 +5,7 @@ import re
### CMakeFile.txt editor class ###############################################
class CMakeFileEditor(object):
"""A tool for editing CMakeLists.txt files. """
- def __init__(self, filename, separator=' ', indent=' '):
+ def __init__(self, filename, separator='\n ', indent=' '):
self.filename = filename
self.cfile = open(filename, 'r').read()
self.separator = separator
diff --git a/gr-utils/src/python/modtool/modtool_add.py b/gr-utils/src/python/modtool/modtool_add.py
index c664d7c1a..581f3b0aa 100644
--- a/gr-utils/src/python/modtool/modtool_add.py
+++ b/gr-utils/src/python/modtool/modtool_add.py
@@ -272,7 +272,7 @@ class ModToolAdd(ModTool):
self._write_tpl('block_python', 'python', fname_py)
append_re_line_sequence(self._file['pyinit'],
'(^from.*import.*\n|# import any pure.*\n)',
- 'from %s import *' % self._info['blockname'])
+ 'from %s import %s' % (self._info['blockname'], self._info['blockname']))
if self.options.skip_cmakefiles:
return
ed = CMakeFileEditor(self._file['cmpython'])
diff --git a/gr-utils/src/python/modtool/modtool_newmod.py b/gr-utils/src/python/modtool/modtool_newmod.py
index 9b2dc6e30..0c69cb69e 100644
--- a/gr-utils/src/python/modtool/modtool_newmod.py
+++ b/gr-utils/src/python/modtool/modtool_newmod.py
@@ -51,7 +51,7 @@ class ModToolNewModule(ModTool):
* Open all files, rename howto and HOWTO to the module name
* Rename files and directories that contain the word howto
"""
- print "Creating out-of-tree module in %s..." % self._dir
+ print "Creating out-of-tree module in %s..." % self._dir,
try:
shutil.copytree('/home/braun/.usrlocal/share/gnuradio/modtool/gr-newmod', self._dir)
os.chdir(self._dir)
diff --git a/gr-utils/src/python/modtool/templates.py b/gr-utils/src/python/modtool/templates.py
index e3019bb70..f41049c5a 100644
--- a/gr-utils/src/python/modtool/templates.py
+++ b/gr-utils/src/python/modtool/templates.py
@@ -287,8 +287,8 @@ import numpy
#set $deciminterp = ', <+interpolation+>'
#else if $blocktype == 'decimator'
#set $deciminterp = ', <+decimation+>'
-#set $deciminterp = ''
#else
+#set $deciminterp = ''
#end if
from gnuradio import gr
@@ -297,7 +297,7 @@ class ${blockname}(${parenttype}):
docstring for block ${blockname}
"""
def __init__(self#if $arglist == '' then '' else ', '#$arglist):
- gr.${parenttype}.__init__(self,
+ ${parenttype}.__init__(self,
#if $blocktype == 'hier'
"$blockname",
gr.io_signature(${inputsig}), # Input signature
@@ -324,8 +324,6 @@ class ${blockname}(${parenttype}):
\#self.consume_each(len(input_items[0]))
return len(output_items[0])
#stop
-#else
- def work(self, input_items, output_items):
#end if
def work(self, input_items, output_items):