I'm new to Python in general so forgive me if this is a simple question that I was unable to find an answer for by searching.

I am writing a plugin that will make some various system calls and then act on the results. Reading the Python docs it suggested to use subprocess for these commands. I have been having issues getting it to work and after some research I found it is because the version of Python that sublime plugins use is 2.6 and the subprocess module has some features in 2.7. Is there a method for using a different Python version or should I not even be using the subprocess call?

Sorry, I wasn't clear. On OS X, it always uses the 2.6 version of the system python, even if you have a newer version (you can see which versions of Python you have in /System/Library/Frameworks/Python.framework/Versions/ and "Current" is probably a symlink to 2.7). It's just a limitation of Sublime.

The "call" method just runs the command, it does not provide any output. You will need to use the Popen object to retrieve the output from the command. For example:

That worked for the simple case of ls -l. I tried the same setup with the ssh command I am running and I'm not getting any errors but no output. Is there anything else that needs to be taken into account when running commands over ssh?

The command below works fine in the terminal but I get nothing back in from the plug-in/sublime.

I got it! Turns out two things were happening. The first was that every time you would use a space it would be a new value in the list. The second was that certain responses of the program I was running on the remote server were putting output to stderr not stdout like I thought.