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

Dr. Harold W. Schranz Harold.Schranz at tpg.com.au
Sat Feb 17 07:15:57 UTC 2007


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
------------------------------------------------------------------------ 
----





More information about the textmate mailing list