parameters: (basedir, generated_modules)
docstring: Create a module file to mark directory for python
  
      :param base_dir: path to package, ``str``
      :param package: name of package to write module for, ``str``
      :param generated_modules: list of generated message modules,
        i.e. the names of the .py files that were generated for each
        .msg file. ``[str]``
docstring_summary: Create a module file to mark directory for python
docstring_tokens: Create a module file to mark directory for python
function: def write_module(basedir, generated_modules):
      """
      Create a module file to mark directory for python
  
      :param base_dir: path to package, ``str``
      :param package: name of package to write module for, ``str``
      :param generated_modules: list of generated message modules,
        i.e. the names of the .py files that were generated for each
        .msg file. ``[str]``
      """
      if not os.path.exists(basedir):
          os.makedirs(basedir)
      elif not os.path.isdir(basedir):
          raise MsgGenerationException("file preventing the creating of module directory: %s"%dir)
      p = os.path.join(basedir, '__init__.py')
      with open(p, 'w') as f:
          for mod in generated_modules:
              f.write('from .%s import *\n'%mod)
  
      parent_init = os.path.dirname(basedir)
function_tokens: def write_module ( basedir , generated_modules ) : if not os . path . exists ( basedir ) : os . makedirs ( basedir ) elif not os . path . isdir ( basedir ) : raise MsgGenerationException ( "file preventing the creating of module directory: %s" % dir ) p = os . path . join ( basedir , '__init__.py' ) with open ( p , 'w' ) as f : for mod in generated_modules : f . write ( 'from .%s import *\n' % mod ) parent_init = os . path . dirname ( basedir )