Skip to content

Instantly share code, notes, and snippets.

@nrjones8
nrjones8 / scp_uploader.py
Last active August 29, 2015 13:56
Simple Sublime Text 2 plugin to sync local files with remote ones via SCP. A simple workaround for lack of a free SFTP library that could be extended/made more robust.
import sublime, sublime_plugin
import sys
# Sublime has its own embedded Python interpreter -- we need to tell it explicitly
# to find installed 3rd party libraries (like paramiko)
PYTHON_PACKAGES_PATH = '/Library/Python/2.7/site-packages'
sys.path.append(PYTHON_PACKAGES_PATH)
from paramiko import SSHClient
from scp import SCPClient