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

Michele Pasin michele.pasin at gmail.com
Wed Aug 14 00:41:49 UTC 2013


hi again

just a clarification: when I do this

os.environ['TM_PROJECT_UUID'] = someobject

I get an error saying that only strings are accepted as possible values.

is there any other approach for storing a non-string in the environment?

many tx, mikele


On Mon, Aug 12, 2013 at 12:00 PM, Allan Odgaard <mailinglist at textmate.org>wrote:

> On 11 Aug 2013, at 19:02, Michele Pasin wrote:
>
>  […] each time I send a command, the socket is obviously re-created; I
>>
>> wondered if I TextMate provides a mechanism to save the 'sock' binding in
>> the current  environment - so that I can reuse it later within other
>> commands.
>>
>
> Not per se, but TextMate does give you a TM_DOCUMENT_UUID and
> TM_PROJECT_UUID variable.
>
> The former is unique per document and the latter is unique per project
> (window).
>
> You can use these as keys into shared storage (such as files in TMPDIR) to
> store things that you wish to associate with a single document or project.
>
> Presently though there is no cleanup callback, so if you spawn a server
> process for a document or project, you should have it shutdown
> automatically if it hasn’t seen any activity for some amount of time.
>
> ______________________________**_________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/**listinfo/textmate<http://lists.macromates.com/listinfo/textmate>




-- 




*--------------------------------*
*www.michelepasin.org* <http://www.michelepasin.org/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20130814/cff97ad4/attachment.html>


More information about the textmate mailing list