[TxMt] Run Script (PyMate) Bug in TextMate Version 1.5.4 (1360) [2007-02-13: REVISION 1360]

Alexander Ross alex.j.ross at gmail.com
Sat Feb 17 07:25:26 UTC 2007


It would appear that sitecustomize.py isn't being loaded at all.   
I'll look into it.

- Alex

On Feb 16, 2007, at 11:15 PM, Dr. Harold W. Schranz wrote:

> Hi Alex
>
> I tried modifying sitecustomize.py (in the TextMate.app/Contents/ 
> SharedSupport/Bundles/Python.tmbundle/Support/PyMate directory) as  
> you suggested ...
>
> On 17/02/2007, at 4:20 PM, Alexander Ross wrote:
>> Harold,
>>
>> In the same directory as pymate.rb, there is a file  
>> "sitecustomize.py".  This is a python module that is loaded for  
>> every python script that is run with PyMate.  If you poke around  
>> in that file, you will find two functions,  "tm_raw_input" and  
>> "tm_input".  Try adding some print statements to figure out where  
>> exactly it's hanging.
>>
>> - Alex
>
> I basically inserted the following (primitive) Python code (to  
> output time-stamped files  to my Desktop ... hopefully ...)
>
> import os
> import time
> fout = open("/Users/harry/Desktop/output sitecustomize "+  
> time.asctime(), "w")
> fout.write("Entered routine sitecustomize ")
> fout.write("Time is " + time.asctime() + " Space is " + os.getcwd()  
> + "\n")
> fout.close()
>
>
> at the beginning of sitecustomize.py and at the beginning of each  
> of the main python routines contained therein
>
> def tm_raw_input(prompt=""):
>
> def tm_input(prompt=""):
>
> def tm_excepthook(e_type, e, tb):
>
> though I suppose only the first two matter here.
>
> Despite running with very simple Python scripts which are  
> interactive (via raw_input or input) ... I don't get any files  
> printed out from sitecustomize.py
> so either it isn't called or for some reason the files don't get  
> written to my Desktop ... so maybe it isn't the problem here.
>
> I'm going to have to go on to my real projects for now (as I have a  
> couple of workarounds anyway).
> This is taking far too much time that I don't have at present ...  
> sorry!
>
> Thanks for the help
> Harry.
>
> ---------------------------------------------------------------------- 
> ------
> Dr. Harold W. Schranz, Research Fellow, Computational Genomics Group
> Division of Molecular Bioscience, John Curtin School of Medical  
> Research
> Australian National University, Canberra ACT 0200, Australia
> ---------------------------------------------------------------------- 
> ------
>
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate




More information about the textmate mailing list