[TxMt] Re: Creating a global variable via bundle command (using Python)

Michele Pasin michele.pasin at gmail.com
Wed Dec 30 11:45:06 UTC 2015


Thanks Allan - I (wrongly) assumed that it was good practice to avoid
reopening the connection each time. Things do work fine with your suggested
solution then.. now moving on to grammars and scopes :-)
Best, m





----
Michele Pasin
http://www.michelepasin.org


On 3 October 2015 at 12:15, Allan Odgaard <mailinglist at textmate.org> wrote:

> 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.
>
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20151230/41ca0d9a/attachment.html>


More information about the textmate mailing list