original_docstring: Write this instance's function to a script with a CLI.
  
          Use the template file to insert the self.func source code and name
          
docstring: Write this instance's function to a script with a CLI.
  Use the template file to insert the self.func source code and name
docstring_tokens: Write this instance ' s function to a script with a CLI . Use the template file to insert the self . func source code and name
code: def _write_script(self):
          """Write this instance's function to a script with a CLI.
  
          Use the template file to insert the self.func source code and name
          """
          with open(self.script_path, "w") as f:
              template_path = os.path.abspath(
                  os.path.join(os.path.dirname(__file__), "templates", "script.template")
              )
  
              with open(template_path, "r") as template:
                  s = Template(template.read())
                  f.write(
                      s.substitute(
                          func_source=inspect.getsource(self.func),
                          func_name=self.func.__name__,
                      )
                  )
  
          mod_logger.info(
              "Wrote python function {func:s} to script {script:s}".format(
                  func=self.name, script=self.script_path
              )
          )
code_tokens: def _write_script ( self ) : with open ( self . script_path , "w" ) as f : template_path = os . path . abspath ( os . path . join ( os . path . dirname ( __file__ ) , "templates" , "script.template" ) ) with open ( template_path , "r" ) as template : s = Template ( template . read ( ) ) f . write ( s . substitute ( func_source = inspect . getsource ( self . func ) , func_name = self . func . __name__ , ) ) mod_logger . info ( "Wrote python function {func:s} to script {script:s}" . format ( func = self . name , script = self . script_path ) )
short_docstring: Write this instance's function to a script with a CLI.
short_docstring_tokens: Write this instance ' s function to a script with a CLI .
comment: """Write this instance's function to a script with a CLI.
  
          Use the template file to insert the self.func source code and name
          """