Creating a SimpleCmd and adding it to the QubeGUI is a relatively straight-forward process. Since the QubeGUI will scan the simplecmds directory for any Python files, it will pick up any newly developed files. These files will contain a create() command that returns a list of SimpleCmd objects.
- Open the simplecmds directory (SimpleCmds Location).
- Create a text file with a Python (.py) extension and open it in your preferred text editor.
- Add an import SimpleCmd to the top of the file. Then write a create() function that returns an array of SimpleCmd instances.
- For testing purposes, add an if __name__ == '__main__': so the submission dialog can be launched directly by running Python _script.py. Here is a simple example:
5. Launch the QubeGUI. The new SimpleCmd should show up under the Submit menu.