Module Expr Str TryExcept body ImportFrom alias ImportFrom alias handlers ExceptHandler body Pass Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Str Str FunctionDef arguments args defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list ClassDef bases NameLoad body Expr Str ClassDef bases body Expr Str Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Dict NameLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr Str Str Str FunctionDef arguments args NameParam NameParam defaults body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return Str decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Index Num decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Index Num decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return Call AttributeLoad Call AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Index Num If CompareIs NameLoad NameLoad body Assign NameStore Str Expr Call AttributeLoad Call NameLoad attr Str NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad Assign AttributeStore NameLoad attr NameLoad If NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad handlers ExceptHandler type NameLoad body Pass orelse Assign NameStore NameLoad Assign NameStore CompareLt Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr For NameStore AttributeLoad AttributeLoad NameLoad attr attr body If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr TryExcept body With Call NameLoad NameLoad Str keyword NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr handlers ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body TryExcept body ImportFrom alias Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad handlers ExceptHandler type NameLoad body Raise NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str BinOpMult Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore NameLoad Expr Call AttributeLoad Call NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr If CompareGt NameLoad NameLoad body Assign NameStore BinOpSub NameLoad Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assert Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr If AttributeLoad NameLoad attr body Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore NameLoad TryExcept body Assign NameStore SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad body Pass orelse While CompareEq NameLoad Str body TryExcept body Expr Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Assign NameStore BinOpAdd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str If BoolOpAnd UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr BoolOpAnd CompareIs NameLoad NameLoad CompareEq NameLoad AttributeLoad NameLoad attr BoolOpAnd CompareIs NameLoad NameLoad CompareEq NameLoad AttributeLoad NameLoad attr body Return If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad attr Num Str NameLoad NameLoad If CompareIs NameLoad NameLoad body If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr orelse Expr Call AttributeLoad Call NameLoad attr Str Return NameLoad If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call NameLoad NameLoad TryExcept body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr handlers ExceptHandler type TupleLoad NameLoad NameLoad NameLoad NameLoad body Assign NameStore NameLoad If AttributeLoad NameLoad attr body Assign NameStore BinOpAdd NameLoad Str orelse Assign NameStore NameLoad TryExcept body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call NameLoad NameLoad Raise NameLoad orelse Expr Call AttributeLoad Call NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad Call NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr If NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad NameLoad body Pass decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad Call NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore AttributeLoad NameLoad attr attr Str If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A 
This module contains the file helper implementation

 N/A N/A future.builtins open future.builtins str N/A N/A N/A N/A N/A locale N/A logging N/A mimetypes N/A os pyqode.core.api.manager Manager pyqode.core.api.utils TextHelper pyqode.qt QtCore QtWidgets pyqode.core.cache Cache N/A N/A N/A mimetypes add_type text/x-python .py N/A N/A N/A mimetypes add_type text/xml .ui _logger N/A N/A N/A N/A N/A N/A N/A logging getLogger __name__ N/A FileManager N/A Manager N/A N/A 
    Helps manage file operations:
        - opening and saving files
        - providing file icon
        - detecting mimetype

    Example of usage::

        editor = CodeEdit()
        assert editor.file.path == ''
        # open a file with default locale encoding or using the cached one.
        editor.open(__file__)
        assert editor.file.path == __file__
        print(editor.file.encoding)

        # reload with another encoding
        editor.open(__file__, encoding='cp1252', use_cached_encoding=False)
        assert editor.file.path == __file__
        editor.file.encoding == 'cp1252'

     EOL N/A N/A N/A 
        This class enumerates the possible EOL conventions:
            - System: apply the system EOL
            - Linux: force the use of Linux EOL (
)
            - Mac: force the use of Macintosh EOL (
)
            - Windows: force the use of Windows EOL (
)
         N/A System 0 N/A Linux 1 N/A Mac 2 N/A Windows 3 N/A _map N/A System Linux Mac Windows N/A os linesep string N/A N/A cls value N/A N/A N/A N/A N/A cls _map N/A value N/A classmethod N/A path N/A N/A self N/A N/A N/A  Gets the file path  N/A N/A self _path N/A N/A N/A N/A N/A os path normpath N/A self _path N/A N/A property name N/A N/A self N/A N/A N/A  Gets the file base name  N/A N/A N/A N/A N/A os path split N/A self path N/A 1 N/A property extension N/A N/A self N/A N/A N/A  Gets the file path  N/A N/A N/A N/A N/A os path splitext N/A self path N/A 1 N/A property dirname N/A N/A self N/A N/A N/A  Gets the file directory name  N/A N/A N/A N/A os path dirname N/A self _path N/A property encoding N/A N/A self N/A N/A N/A  Gets the file encoding  N/A N/A self _encoding N/A property icon N/A N/A self N/A N/A N/A  Gets the file icon, provided by _get_icon  N/A N/A N/A self _get_icon N/A property autodetect_eol N/A N/A self N/A N/A N/A N/A self _autodetect_eol N/A property autodetect_eol N/A N/A self value N/A N/A N/A N/A self _autodetect_eol value N/A N/A N/A self _autodetect_eol N/A N/A N/A self _eol N/A N/A N/A self EOL string N/A self _preferred_eol N/A N/A autodetect_eol setter preferred_eol N/A N/A self N/A N/A N/A N/A self _preferred_eol N/A property preferred_eol N/A N/A self eol N/A N/A N/A N/A self _preferred_eol eol N/A N/A N/A self _autodetect_eol N/A N/A N/A self _eol N/A N/A N/A self EOL string N/A self _preferred_eol N/A N/A preferred_eol setter file_size_limit N/A N/A self N/A N/A N/A 
        Returns the file size limit. If the size of the file to open
        is superior to the limit, then we disabled syntax highlighting, code
        folding,... to improve the load time and the runtime performances.

        Default is 10MB.
         N/A N/A self _limit N/A property file_size_limit N/A N/A self value N/A N/A N/A N/A self _limit value N/A N/A file_size_limit setter _get_icon N/A N/A self N/A N/A N/A N/A N/A N/A N/A QtWidgets QFileIconProvider icon N/A N/A QtCore QFileInfo N/A self path N/A __init__ N/A N/A self editor replace_tabs_by_spaces N/A True N/A N/A 
        :param editor: Code edit instance to work on.
        :param replace_tabs_by_spaces: True to replace tabs by spaces on
            load/save.
         N/A N/A N/A N/A super FileManager self __init__ editor N/A N/A self _limit 10000000 N/A N/A self _path N/A N/A self mimetype N/A N/A self _encoding N/A N/A locale getpreferredencoding N/A N/A self replace_tabs_by_spaces replace_tabs_by_spaces N/A N/A self opening False N/A N/A self saving True N/A N/A self safe_save True N/A N/A self clean_trailing_whitespaces True N/A N/A self restore_cursor True N/A N/A self _preferred_eol N/A N/A self EOL System N/A N/A self _eol N/A N/A N/A self EOL string N/A self _preferred_eol N/A N/A self _autodetect_eol True N/A get_mimetype N/A N/A path N/A N/A N/A 
        Guesses the mime type of a file. If mime type cannot be detected, plain
        text is assumed.

        :param path: path of the file
        :return: the corresponding mime type.
         N/A filename N/A N/A N/A N/A os path split path N/A 1 N/A mimetype N/A N/A N/A mimetypes guess_type filename N/A 0 N/A N/A mimetype None N/A N/A mimetype text/x-plain N/A N/A N/A N/A _logger debug mimetype detected: %s mimetype N/A mimetype N/A staticmethod open N/A N/A self path encoding use_cached_encoding N/A None True N/A N/A 
        Open a file and set its content on the editor widget.

        pyqode does not try to guess encoding. It's up to the client code to
        handle encodings. You can either use a charset detector to detect
        encoding or rely on a settings in your application. It is also up to
        you to handle UnicodeDecodeError, unless you've added
        class:`pyqode.core.panels.EncodingPanel` on the editor.

        pyqode automatically caches file encoding that you can later reuse it
        automatically.

        :param path: Path of the file to open.
        :param encoding: Default file encoding. Default is to use the locale
                         encoding.
        :param use_cached_encoding: True to use the cached encoding instead
            of ``encoding``. Set it to True if you want to force reload with a
            new encoding.

        :raises: UnicodeDecodeError in case of error if no EncodingPanel
            were set on the editor.
         N/A ret_val False N/A N/A encoding None N/A N/A encoding N/A N/A locale getpreferredencoding N/A N/A self opening True N/A settings N/A Cache N/A N/A self _path path N/A use_cached_encoding N/A N/A N/A N/A cached_encoding N/A N/A settings get_file_encoding path preferred_encoding encoding N/A N/A N/A KeyError N/A N/A N/A N/A encoding cached_encoding N/A enable_modes N/A N/A N/A N/A os path getsize path N/A self _limit N/A m N/A N/A self editor modes N/A N/A N/A m enabled N/A N/A N/A m enabled enable_modes N/A N/A enable_modes N/A N/A N/A N/A N/A N/A self editor modes clear N/A N/A N/A N/A open path Ur encoding encoding file N/A N/A content N/A N/A file read N/A N/A self autodetect_eol N/A N/A N/A self _eol N/A file newlines N/A N/A isinstance N/A self _eol tuple N/A N/A N/A self _eol N/A N/A self _eol N/A 0 N/A N/A N/A self _eol None N/A N/A N/A self _eol N/A N/A N/A self EOL string N/A self preferred_eol N/A N/A N/A self _eol N/A N/A N/A self EOL string N/A self preferred_eol N/A N/A N/A N/A UnicodeDecodeError UnicodeError N/A e N/A N/A N/A pyqode.core.panels EncodingPanel N/A panel N/A N/A N/A N/A self editor panels get EncodingPanel N/A N/A N/A KeyError N/A N/A e N/A N/A N/A N/A panel on_open_failed path encoding N/A N/A N/A N/A settings set_file_encoding path encoding N/A N/A self _encoding encoding N/A N/A self replace_tabs_by_spaces N/A N/A content N/A N/A content replace N/A N/A N/A self editor tab_length N/A N/A N/A N/A self editor setPlainText content N/A N/A self get_mimetype path N/A self encoding N/A N/A N/A N/A self editor setDocumentTitle N/A N/A N/A self editor file name N/A ret_val True N/A N/A N/A N/A _logger debug file open: %s path N/A N/A self opening False N/A N/A self restore_cursor N/A N/A N/A N/A self _restore_cached_pos N/A N/A N/A self _check_for_readonly N/A ret_val N/A _check_for_readonly N/A N/A self N/A N/A N/A N/A self read_only N/A N/A N/A os access N/A self path N/A os W_OK N/A N/A N/A N/A self editor setReadOnly N/A self read_only N/A _restore_cached_pos N/A N/A self N/A N/A N/A pos N/A N/A N/A Cache get_cursor_position N/A self path N/A max_pos N/A N/A N/A N/A N/A self editor document characterCount N/A N/A pos max_pos N/A N/A pos N/A max_pos 1 N/A tc N/A N/A N/A self editor textCursor N/A N/A N/A tc setPosition pos N/A N/A N/A N/A self editor setTextCursor tc N/A N/A N/A N/A QtCore QTimer singleShot 1 N/A N/A self editor centerCursor N/A reload N/A N/A self encoding N/A N/A N/A 
        Reload the file with another encoding.

        :param encoding: the new encoding to use to reload the file.
         N/A N/A N/A N/A os path exists N/A self path N/A N/A N/A self open N/A self path encoding encoding use_cached_encoding False N/A _rm N/A N/A tmp_path N/A N/A N/A N/A N/A N/A os path exists tmp_path N/A N/A N/A N/A os remove tmp_path N/A staticmethod _reset_selection N/A N/A self sel_end sel_start N/A N/A N/A text_cursor N/A N/A N/A self editor textCursor N/A N/A N/A text_cursor setPosition sel_start N/A N/A N/A text_cursor setPosition sel_end N/A text_cursor KeepAnchor N/A N/A N/A N/A self editor setTextCursor text_cursor N/A _get_selection N/A N/A self N/A N/A N/A sel_start N/A N/A N/A N/A N/A self editor textCursor selectionStart N/A sel_end N/A N/A N/A N/A N/A self editor textCursor selectionEnd N/A N/A sel_end sel_start N/A _get_text N/A N/A self encoding N/A N/A N/A lines N/A N/A N/A N/A N/A self editor toPlainText splitlines N/A N/A self clean_trailing_whitespaces N/A N/A lines N/A N/A N/A l rstrip N/A l lines N/A N/A N/A last_line N/A lines N/A -1 N/A N/A N/A IndexError N/A N/A N/A N/A N/A last_line N/A N/A N/A N/A N/A N/A lines pop N/A last_line N/A lines N/A -1 N/A N/A N/A IndexError N/A N/A last_line None N/A text N/A N/A N/A N/A self _eol join lines N/A self _eol N/A N/A N/A text encode encoding N/A save N/A N/A self path encoding fallback_encoding N/A None None None N/A N/A 
        Save the editor content to a file.

        :param path: optional file path. Set it to None to save using the
                     current path (save), set a new path to save as.
        :param encoding: optional encoding, will use the current
                         file encoding if None.
        :param fallback_encoding: Fallback encoding to use in case of encoding
            error. None to use the locale preferred encoding

         N/A N/A N/A N/A N/A self editor dirty N/A N/A encoding None N/A encoding N/A self encoding N/A N/A path None N/A path N/A self path N/A N/A N/A N/A fallback_encoding None N/A N/A fallback_encoding N/A N/A locale getpreferredencoding N/A N/A N/A N/A _logger log 5 saving %r with %r encoding path encoding N/A N/A path None N/A N/A N/A self path N/A N/A path N/A self path N/A N/A N/A N/A N/A _logger debug failed to save file, path argument cannot be None if FileManager.path is also None N/A False N/A N/A encoding None N/A N/A encoding N/A self _encoding N/A N/A self saving True N/A N/A N/A N/A N/A self editor text_saving emit N/A str path N/A N/A N/A st_mode N/A N/A N/A os stat path st_mode N/A N/A N/A N/A ImportError TypeError AttributeError OSError N/A N/A st_mode None N/A N/A self safe_save N/A N/A tmp_path N/A path ~ N/A N/A tmp_path path N/A N/A N/A N/A open tmp_path wb file N/A N/A N/A N/A file write N/A N/A self _get_text encoding N/A N/A N/A UnicodeEncodeError N/A N/A N/A open tmp_path wb file N/A N/A N/A N/A file write N/A N/A self _get_text fallback_encoding N/A N/A N/A IOError OSError N/A e N/A N/A N/A N/A self _rm tmp_path N/A N/A self saving False N/A N/A N/A N/A N/A self editor text_saved emit N/A str path N/A e N/A N/A N/A N/A N/A Cache set_file_encoding path encoding N/A N/A self _encoding encoding N/A N/A self safe_save N/A N/A N/A N/A self _rm path N/A N/A N/A os rename tmp_path path N/A N/A N/A self _rm tmp_path N/A N/A N/A N/A N/A N/A self editor document setModified False N/A N/A self _path N/A N/A N/A os path normpath path N/A N/A N/A N/A N/A self editor text_saved emit N/A str path N/A N/A self saving False N/A N/A N/A N/A _logger debug file saved: %s path N/A N/A N/A self _check_for_readonly N/A st_mode N/A N/A N/A N/A N/A N/A os chmod path st_mode N/A N/A N/A N/A ImportError TypeError AttributeError N/A N/A N/A close N/A N/A self clear N/A True N/A N/A 
        Close the file open in the editor:
            - clear editor content
            - reset file attributes to their default values

        :param clear: True to clear the editor content. Default is True.
         N/A N/A N/A N/A Cache set_cursor_position N/A self path N/A N/A N/A N/A N/A self editor textCursor position N/A N/A N/A self editor _original_text N/A clear N/A N/A N/A N/A N/A self editor clear N/A N/A self _path N/A N/A self mimetype N/A N/A self _encoding N/A N/A locale getpreferredencoding N/A clone_settings N/A N/A self original N/A N/A N/A N/A self replace_tabs_by_spaces N/A original replace_tabs_by_spaces N/A N/A self safe_save N/A original replace_tabs_by_spaces N/A N/A self clean_trailing_whitespaces N/A original clean_trailing_whitespaces N/A N/A self restore_cursor N/A original restore_cursor N/A N/A