parameters: (self, append=False)
docstring: Writes this code unit to the filename
docstring_summary: Writes this code unit to the filename
docstring_tokens: Writes this code unit to the filename
function: def Save(self, append=False):
          'Writes this code unit to the filename'
          space = '\n\n'
          if not append:
              flag = 'w'
          else:
              flag = 'a'
          fout = SmartFile(self.filename, flag)
          fout.write('\n')
          # includes
          # boost.python header
          if self.code['pchinclude']:
              fout.write(left_equals('PCH'))        
              fout.write(self.code['pchinclude']+'\n')
              fout.write('#ifdef _MSC_VER\n')
              fout.write('#pragma hdrstop\n')
              fout.write('#endif\n') 
          else:
              fout.write(left_equals('Boost Includes'))        
              fout.write('#include <boost/python.hpp>\n')
              # include numerical boost for int64 definitions
              fout.write('#include <boost/cstdint.hpp>\n') 
          fout.write('\n')
          # other includes        
          if self.code['include']:
              fout.write(left_equals('Includes'))        
              includes = remove_duplicated_lines(self.code['include'])
              fout.write(includes)
              fout.write(space)
          # using
          if settings.USING_BOOST_NS and not append:
              fout.write(left_equals('Using'))
              fout.write('using namespace boost::python;\n\n')
          # declarations
          declaration = self.code['declaration']
          declaration_outside = self.code['declaration-outside']
          if declaration_outside or declaration:
              fout.write(left_equals('Declarations'))
              if declaration_outside:
                  fout.write(declaration_outside + '\n\n')
              if declaration:
                  pyste_namespace = namespaces.pyste[:-2]            
                  fout.write('namespace %s {\n\n' % pyste_namespace)
                  fout.write(declaration) 
                  fout.write('\n}// namespace %s\n' % pyste_namespace)
                  fout.write(space)
          # module
          fout.write(left_equals('Module'))
          fout.write(self.module_definition + '\n')
          fout.write('{\n')
          fout.write(self.code['module']) 
          fout.write('}\n\n')
          fout.close()
function_tokens: def Save ( self , append = False ) : space = '\n\n' if not append : flag = 'w' else : flag = 'a' fout = SmartFile ( self . filename , flag ) fout . write ( '\n' ) # includes # boost.python header if self . code [ 'pchinclude' ] : fout . write ( left_equals ( 'PCH' ) ) fout . write ( self . code [ 'pchinclude' ] + '\n' ) fout . write ( '#ifdef _MSC_VER\n' ) fout . write ( '#pragma hdrstop\n' ) fout . write ( '#endif\n' ) else : fout . write ( left_equals ( 'Boost Includes' ) ) fout . write ( '#include <boost/python.hpp>\n' ) # include numerical boost for int64 definitions fout . write ( '#include <boost/cstdint.hpp>\n' ) fout . write ( '\n' ) # other includes         if self . code [ 'include' ] : fout . write ( left_equals ( 'Includes' ) ) includes = remove_duplicated_lines ( self . code [ 'include' ] ) fout . write ( includes ) fout . write ( space ) # using if settings . USING_BOOST_NS and not append : fout . write ( left_equals ( 'Using' ) ) fout . write ( 'using namespace boost::python;\n\n' ) # declarations declaration = self . code [ 'declaration' ] declaration_outside = self . code [ 'declaration-outside' ] if declaration_outside or declaration : fout . write ( left_equals ( 'Declarations' ) ) if declaration_outside : fout . write ( declaration_outside + '\n\n' ) if declaration : pyste_namespace = namespaces . pyste [ : - 2 ] fout . write ( 'namespace %s {\n\n' % pyste_namespace ) fout . write ( declaration ) fout . write ( '\n}// namespace %s\n' % pyste_namespace ) fout . write ( space ) # module fout . write ( left_equals ( 'Module' ) ) fout . write ( self . module_definition + '\n' ) fout . write ( '{\n' ) fout . write ( self . code [ 'module' ] ) fout . write ( '}\n\n' ) fout . close ( )