After a few comments and my own consideration I've completely Edited the content (and title) of this post.
QUESTION
What are valid "output_layer" parameter options when scripting with the "saveselectedfeatures" tool?
I'm writing a script that uses the tool as follows:
processing.runandload('qgis:saveselectedfeatures', Input, 'Output.shp')
I also tried removing the shapefile extension and just putting 'Output' as the final parameter. Still errors and no resulting output.
BTW don'tDon't worry about "Input", it's a perfectly valid layer with selected features.
PARTIAL SOLUTION
Thanks to @Joseph forprovided the partial solution of replacing " 'Output.shp' " with " None " (no quotations).
processing.runandload('qgis:saveselectedfeatures', Input, None)
This results in successful execution with a temporary output layer called "Solution" popping up in the Layers Window.
BUT...
I call this a partial solution because I find it hard to believe that the designer(s) of this tool didn't also intend to give users the option to choose the name of their output file (as I originally tried to do) via the final parameter ('output_layer'), as described in the tool's Help Tab.
FINAL THOUGHTS
The tool's Help tab offers the following instruction:
But it seems this is not quite as "helpful" as it could be. It seems like a few short and simple examples of acceptable values for the 2nd parameter would avoid any confusion.
Something like:
Output file options: temporary layer, Shapefile, etc...
2nd Parameter ('output_layer') options:
" 'User_chosen_name' " (or " 'User_chosen_name.shp' "), OR "None" (produces auto-named temporary layer).
I say this only in the interest of being constructive. I'mI'm a relatively new user of Q, and I realize it's an open-source volunteer-driven project, and in that context it's a truly impressive piece of software, but it seems the Help tabs often fall just short of being truly informative, in the sense of empowering the average scripter to use them "out of the box", without having to research elsewhere (e.g. books, and online resources like GIS_SE).
I'm not averse to backing my words with action and contributing to the software in areas like this, but I haven't the first idea of how to do soQGIS.