On Sun, May 14, 2017 at 10:57:57PM -0500, Jim wrote: > I am running this on Mint 18. > This is the third script I have written to open and position windows in > workspaces. The first two work, but trying to open ebook-viewe r > (calibre) with a specific book produces the following error. > If I run the same command in the terminal it works without an error.
I think your problem is that you're telling subprocess to run a command called: ebook-viewer /home/jfb/Documents/eBooks/Javascript/GOOGLE_SHEETS/googlespreadsheetprogramming.epub with no arguments. What you want is a command called: ebook-viewer and a single argument: /home/jfb/Documents/eBooks/Javascript/GOOGLE_SHEETS/googlespreadsheetprogramming.epub I think (but haven't tried it) that the simplest way to fix that is to change the entry in self.programs from: > self.programs = ['jedit', 'google-chrome', 'doublecmd', > 'ebook-viewer > /home/jfb/Documents/eBooks/Javascript/GOOGLE_SHEETS/googlespreadsheetprogramming.epub'] to: path_to_file = '/home/jfb/Documents/eBooks/Javascript/GOOGLE_SHEETS/googlespreadsheetprogramming.epub' self.programs = ['jedit', 'google-chrome', 'doublecmd', ['ebook-viewer', path_to_file], ] and see if that fixes it. (It may not be enough, or the right approach, but at least you'll get a different error if it is wrong :-) The difference is that the shell automatically splits things on spaces, so it sees the space between ebook-viewer and the long path, and treats the first word as the executable and the second as an argument. But Python treats the whole string, spaces and quotes included, as the executable. -- Steve _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor