示例#1
0
 def append(self, filename):
     self._checkCwd()
     length = os.stat(filename).st_size
     self._journalCommand('append', filename, length)
     replacement = self._replacement(filename)
     File.copy(filename, replacement)
     return open(replacement, 'a')
示例#2
0
    package = relpath(__file__, packages_path())
    line = exc_info()[2].tb_lineno
    error_message("""python%s\n%s
line %s:\n
%s:\n%s""" % (python_version(), package, line, type(e), str(e)))


def pgpass_tip():
    url = "www.postgresql.org/docs/9.2/static/libpq-pgpass.html"
    status_message(url)
    message_dialog("psql get password from pgpass")
    status_message(url)


if not file.exists(settings.user.file):
    file.copy(settings.file, settings.user.file)
    open_file(settings.user.file)
    message_dialog("edit PostgreSQL connection settings")
    pgpass_tip()

name = "PostgreSQL.sublime-settings"
s = load_settings(name)
error_message(s.get("database"))


class PostgresqlRunCommand(SafeCommand):
    def saferun(self):
        pass
        #psql=settings.default.psql
        #host=settings.default.host
        #port=settings.default.port
示例#3
0
 def _makeOriginal(self, filename):
     File.copy(filename, self._original(filename))
    error_message("""python%s\n%s
line %s:\n
%s:\n%s""" % (
                  python_version(), package, line,
                  type(e), str(e)
                  ))


def pgpass_tip():
    url = "www.postgresql.org/docs/9.2/static/libpq-pgpass.html"
    status_message(url)
    message_dialog("psql get password from pgpass")
    status_message(url)

if not file.exists(settings.user.file):
    file.copy(settings.file, settings.user.file)
    open_file(settings.user.file)
    message_dialog("edit PostgreSQL connection settings")
    pgpass_tip()


name = "PostgreSQL.sublime-settings"
s = load_settings(name)
error_message(s.get("database"))


class PostgresqlRunCommand(SafeCommand):
    def saferun(self):
        pass
        #psql=settings.default.psql
        #host=settings.default.host