Skip to content

Start a new session of Pylab with all opened files #8

@ximeg

Description

@ximeg

Idea

It would be a very nice feature to load all opened files into the new pylab environment. Then in would be possible to immediately switch from viewing of spectra to actual data processing.

Realization

When user presses some hotkey, do the following:

  • Save the opened dataset into a temporary file (e.g. pickle it)
  • Create a short script that:
    • Reads the dataset from the temporary file
    • Removes the temporary file and the script itself
  • Start a new terminal window with ipython in it
  • Load pylab
  • Start the aforementioned script inside of the new Pylab session
Code snippet:
xfce4-terminal -e "ipython -i /usr/local/bin/speview.py -- data-sample_1-plastic.SPE"
Problem

How to determine what is the command to start a terminal? Maybe ask user about it, then save it into the config (one more global config in $HOME/.config folder)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions