wxPython/wxGlade-0.9.1/codegen/__init__.py
def init_files(self, out_path):
        "Initialise the file handling; outp_path: file or path, depending on self.multiple_files"
        # You may overwrite this function in the derived class
        if self.multiple_files:
            self.previous_source = None
            if not os.path.isdir(out_path):
                raise errors.WxgOutputPathIsNotDirectory(out_path)
            self.out_dir = out_path
        else:
            if os.path.isdir(out_path):
                raise errors.WxgOutputPathIsDirectory(out_path)
            if not self._overwrite and self._file_exists(out_path):
                # the file exists, we must keep all the lines not inside a
                # wxGlade block. NOTE: this may cause troubles if out_path is
                # not a valid source file, so be careful!
                self.previous_source = self.SourceFileContent(out_path, self)
            else:
                # if the file doesn't exist, create it and write the ``intro''
                self.previous_source = None
                self.output_file = []
                self.output_file_name = out_path
                self.output_file.extend( self.header_lines )
                self.output_file.append('<%swxGlade extra_modules>\n' % self.nonce)
                self.output_file.append('\n')
                self.output_file.append('<%swxGlade replace dependencies>\n' % self.nonce)
                self.output_file.append('<%swxGlade replace extracode>\n' % self.nonce)
Initialise the file handling; outp_path: file or path, depending on self.multiple_files
Initialise the file handling; outp_path: file or path, depending on self.multiple_files
Initialise the file handling ; outp_path : file or path depending on self . multiple_files
def init_files(self, out_path):
        if self.multiple_files:
            self.previous_source = None
            if not os.path.isdir(out_path):
                raise errors.WxgOutputPathIsNotDirectory(out_path)
            self.out_dir = out_path
        else:
            if os.path.isdir(out_path):
                raise errors.WxgOutputPathIsDirectory(out_path)
            if not self._overwrite and self._file_exists(out_path):
                self.previous_source = self.SourceFileContent(out_path, self)
            else:
                self.previous_source = None
                self.output_file = []
                self.output_file_name = out_path
                self.output_file.extend( self.header_lines )
                self.output_file.append('<%swxGlade extra_modules>\n' % self.nonce)
                self.output_file.append('\n')
                self.output_file.append('<%swxGlade replace dependencies>\n' % self.nonce)
                self.output_file.append('<%swxGlade replace extracode>\n' % self.nonce)
def init_files ( self , out_path ) : if self . multiple_files : self . previous_source = None if not os . path . isdir ( out_path ) : raise errors . WxgOutputPathIsNotDirectory ( out_path ) self . out_dir = out_path else : if os . path . isdir ( out_path ) : raise errors . WxgOutputPathIsDirectory ( out_path ) if not self . _overwrite and self . _file_exists ( out_path ) : self . previous_source = self . SourceFileContent ( out_path , self ) else : self . previous_source = None self . output_file = [ ] self . output_file_name = out_path self . output_file . extend ( self . header_lines ) self . output_file . append ( '<%swxGlade extra_modules>\n' % self . nonce ) self . output_file . append ( '\n' ) self . output_file . append ( '<%swxGlade replace dependencies>\n' % self . nonce ) self . output_file . append ( '<%swxGlade replace extracode>\n' % self . nonce )
Initialise the file handling; outp_path: file or path, depending on self.multiple_files
Initialise the file handling ; outp_path : file or path depending on self . multiple_files
"Initialise the file handling; outp_path: file or path, depending on self.multiple_files" # You may overwrite this function in the derived class # the file exists, we must keep all the lines not inside a # wxGlade block. NOTE: this may cause troubles if out_path is # not a valid source file, so be careful! # if the file doesn't exist, create it and write the ``intro''
self
out_path