[TxMt] Re: Creating a global variable via bundle command (using Python)
Allan Odgaard
mailinglist at textmate.org
Sat Oct 3 11:15:44 UTC 2015
On 17 Sep 2015, at 1:03, Michele Pasin wrote:
> The problem is, Python's pickle doesn't support all kinds of objects,
> and
> sockets are among those […] So I wonder if there's another way of
> approaching the problem; or, if by any chance, the same approach done
> via another language (eg Ruby) would not
> encounter any limitation.
I am not sure why you want to reuse the socket.
The server will run and keep listening on port 7099.
Each time you run the command, it will have to create a new connection
to the server, but the server can keep state, as it will not terminate
between connections/command invocations.
You can use TM_DOCUMENT_UUID or TM_PROJECT_UUID as client ID for the
server, so that the server can maintain a “session” per
document/project.
Creating a new connection to the server per request is not uncommon or
expensive when server is running on localhost.
More information about the textmate
mailing list