pyspread.*

pyspread

  • Main Python spreadsheet application

  • Run this script to start the application.

Provides

  • MainApplication: Initial command line operations and application launch

  • MainWindow: Main windows class

class pyspread.MainWindow(filepath=None, default_settings=False)[source]

Bases: PyQt5.QtWidgets.QMainWindow

Pyspread main window

Parameters
  • filepath (Optional[str]) – File path for inital file to be opened

  • default_settings (bool) – Ignore stored QSettings and use defaults

_init_toolbars()[source]

Initialize the main window toolbars

_init_widgets()[source]

Initialize widgets

_init_window()[source]

Initialize main window components

_layout()[source]

Layouts for main window

_toggle_widget(widget, action_name, toggled)[source]

Toggles widget visibility and updates toggle actions

Parameters
  • widget (QWidget) – Widget to be toggled shown or hidden

  • action_name (str) – Name of action from Action class

  • toggled (bool) – Toggle state

closeEvent(event=None)[source]

Overloaded, allows saving changes or canceling close

Parameters

event (Optional[QEvent]) – Any QEvent

eventFilter(source, event)[source]

Overloaded event filter for handling QDockWidget close events

Updates the menu if the macro panel is closed.

Parameters
  • source (QWidget) – Source widget of event

  • event (QEvent) – Any QEvent

Return type

bool

property focused_grid

Returns grid with focus or self if none has focus

gui_update
on_about()[source]

Show about message box

on_approve()[source]

Approve event handler

on_clear_globals()[source]

Clear globals event handler

on_dependencies()[source]

Dependancies installer (installer.InstallerDialog)

on_focus_changed(old, now)[source]

Handles grid clicks from entry line

on_fullscreen()[source]

Fullscreen toggle event handler

on_gui_update(attributes)[source]

GUI update that shall be called on each cell change

Parameters

attributes (CellAttributes) – Attributes of current cell

on_manual()[source]

Show manual browser

on_paint_request(printer)[source]

Paints to printer

Parameters

printer (QPrinter) – Target printer

on_preferences()[source]

Preferences event handler (dialogs.PreferencesDialog)

on_preview()[source]

Print preview event handler

on_print()[source]

Print event handler

on_redo()[source]

Undo event handler

on_refresh_timer()[source]

Event handler for self.refresh_timer.timeout

Called for periodic updates of frozen cells. Does nothing if either the entry_line or a cell editor is active.

on_toggle_entry_line_dock(toggled)[source]

Entryline toggle event handler

Parameters

toggled (bool) – Toggle state

on_toggle_find_toolbar(toggled)[source]

Find toolbar toggle event handler

Parameters

toggled (bool) – Toggle state

on_toggle_format_toolbar(toggled)[source]

Format toolbar toggle event handler

Parameters

toggled (bool) – Toggle state

on_toggle_macro_dock(toggled)[source]

Macro panel toggle event handler

Parameters

toggled (bool) – Toggle state

on_toggle_macro_toolbar(toggled)[source]

Macro toolbar toggle event handler

Parameters

toggled (bool) – Toggle state

on_toggle_main_toolbar(toggled)[source]

Main toolbar toggle event handler

Parameters

toggled (bool) – Toggle state

on_toggle_refresh_timer(toggled)[source]

Toggles periodic timer for frozen cells

Parameters

toggled (bool) – Toggle state

on_tutorial()[source]

Show tutorial browser

on_undo()[source]

Undo event handler

resizeEvent(event)[source]

Overloaded, aborts on self._loading

Parameters

event (QEvent) – Resize event

property safe_mode: bool

Returns safe_mode state. In safe_mode cells are not evaluated.

Return type

bool

update_action_toggles()[source]

Updates the toggle menu check states

pyspread.excepthook(exception_type, exception_value, exception_traceback)[source]

Exception hook that prevents pyspread from crashing on exceptions

pyspread.main()[source]

Pyspread main