Harold,
Are there any files in the directories ~/Library/Application Support/TextMate/ or /Library/Application Support/TextMate/? It's possible that you have an older version of the Support directory in one of those folders. If you do see a Support folder in one of those directories, it is OK to delete it. Restart TextMate and see if you still get a hung PyMate when running the test script.
1. I have a directory: /Users/harry/Library/Application Support/ TextMate which contained 3 subdirectories: Bundles Pristine Copy Support
a. Bundles directory merely contains an extra command added to Python.tmbundle (Run Script (PyMate) version 2.tmCommand based on using the pymate.py script) b. Pristine Copy directory contains bundles that have been downloaded via svn and installed ... to be safe (from conflict) I moved/deleted all these bundles. c. Support directory seemed to be empty; only contained a hidden .svn subdirectory
2. After deleting the Support directory (/Users/harry/Library/ Application Support/TextMate/Support) as you suggested ...
I ran the test python script using PyMate ...
but the latest (bleeding edge) version TextMate Version 1.5.4 (1360) still gets hung ...
PyMate r6190 running Python 2.3.5 (/usr/bin/python)
test_input.py
3. whereas a previous version, TextMate Version 1.5.4 (1324) works OK (cut and paste from PyMate screen; excess blank lines deleted):
HIDE STDERR SHOW STDERR Python 2.5.0 - PyMate r5848 For comments contact the author. The regular Python interpreter can be invoked using ⌘⇧R.
test_input.py
1 forcing redraw!!! don't remove Script terminated with success.
4. as does TextMate Version 1.5.2 (1103)
Python 2.5.0 - PyMate r3226 For comments contact the author. The regular Python interpreter can be invoked using ⌘⇧R.
test_input.py
1 forcing redraw!!! don't remove Script terminated with success.
5. These older versions use $TM_BUNDLE_SUPPORT/pymate.py rather than $TM_BUNDLE_SUPPORT/PyMate/pymate.rb
I can more or less make sense of the pymate.py code but the Ruby code pymate.rb appears enigmatic.
so far it is a mystery which may have to go on the backburner ...
Adios 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 ------------------------------------------------------------------------ ----
Harold,
Did you also check /Library/Application Support/TextMate? Also, do you have anything special with your installation of python? Perhaps a site_customize.py in your home directory?
Can you use raw_input? Eg. try:
#!/usr/bin/python x = raw_input("Raw Input:") y = eval(x) print y
- Alex
On Feb 16, 2007, at 7:06 PM, Dr. Harold W. Schranz wrote:
Harold,
Are there any files in the directories ~/Library/Application Support/TextMate/ or /Library/Application Support/TextMate/? It's possible that you have an older version of the Support directory in one of those folders. If you do see a Support folder in one of those directories, it is OK to delete it. Restart TextMate and see if you still get a hung PyMate when running the test script.
- I have a directory: /Users/harry/Library/Application Support/
TextMate which contained 3 subdirectories: Bundles Pristine Copy Support
a. Bundles directory merely contains an extra command added to Python.tmbundle (Run Script (PyMate) version 2.tmCommand based on using the pymate.py script) b. Pristine Copy directory contains bundles that have been downloaded via svn and installed ... to be safe (from conflict) I moved/deleted all these bundles. c. Support directory seemed to be empty; only contained a hidden .svn subdirectory
- After deleting the Support directory (/Users/harry/Library/
Application Support/TextMate/Support) as you suggested ...
I ran the test python script using PyMate ...
but the latest (bleeding edge) version TextMate Version 1.5.4 (1360) still gets hung ...
PyMate r6190 running Python 2.3.5 (/usr/bin/python)
test_input.py
- whereas a previous version, TextMate Version 1.5.4 (1324) works
OK (cut and paste from PyMate screen; excess blank lines deleted):
HIDE STDERR SHOW STDERR Python 2.5.0 - PyMate r5848 For comments contact the author. The regular Python interpreter can be invoked using ⌘⇧R.
test_input.py
1 forcing redraw!!! don't remove Script terminated with success.
- as does TextMate Version 1.5.2 (1103)
Python 2.5.0 - PyMate r3226 For comments contact the author. The regular Python interpreter can be invoked using ⌘⇧R.
test_input.py
1 forcing redraw!!! don't remove Script terminated with success.
- These older versions use $TM_BUNDLE_SUPPORT/pymate.py rather
than $TM_BUNDLE_SUPPORT/PyMate/pymate.rb
I can more or less make sense of the pymate.py code but the Ruby code pymate.rb appears enigmatic.
so far it is a mystery which may have to go on the backburner ...
Adios 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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Hi Alex
On 17/02/2007, at 2:23 PM, Alexander Ross wrote:
Harold,
Did you also check /Library/Application Support/TextMate? Also, do you have anything special with your installation of python? Perhaps a site_customize.py in your home directory?
Sorry I forgot to mention I don't have /Library/Application Support/ TextMate directory.
Aside from the the default Apple install of python in /usr/bin/python, I have installed the recommended version of python 2.5 (Framework build) and it is linked to /usr/local/bin: /usr/local/bin/python -> ../../../Library/Frameworks/Python.framework/ Versions/2.5/bin/python (My default $PATH searches /usr/local/bin ahead of /usr/bin/ )
Can you use raw_input? Eg. try:
#!/usr/bin/python x = raw_input("Raw Input:") y = eval(x) print y
Using TextMate Version 1.5.4 (1360):
1. Only response I get is:
PyMate r6190 running Python 2.3.5 (/usr/bin/python)
test_raw_input.py
and I have to stop the task before I can close the window.
2. Running using the Run Script (Terminal) command works fine (calls pythonw rather than python):
clear; cd '/Users/harry/Desktop'; 'pythonw' '/Users/harry/Desktop/ test_raw_input.py'; rm -f ''
3. Running the old version (via pymate.py) works fine (though it appears to disregard the /usr/bin/python (2.3) for the /usr/local/bin/ python (2.5) ): HIDE STDERR SHOW STDERR Python 2.5.0 - PyMate r5848 For comments contact the author. The regular Python interpreter can be invoked using ⌘⇧R.
test_raw_input.py
123 forcing redraw!!! don't remove Script terminated with success.
I noticed that in the pymate.py code there is an explicit function for putting up a CocoaDialog input box (via raw_input_replacement (prompt='')); is the same Cocoa dialog input box supposed to come up with the Ruby code pymate.rb? This failure may be the kernel of the problem ... is there a simple test whether my ruby install is working? /usr/bin/ruby -v ruby 1.8.2 (2004-12-25) [universal-darwin8.0] file /usr/bin/ruby /usr/bin/ruby: Mach-O universal binary with 2 architectures /usr/bin/ruby (for architecture i386): Mach-O executable i386 /usr/bin/ruby (for architecture ppc): Mach-O executable ppc
Sorry to present such an intractable enigmatic problem ...
Harry.
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
On Feb 16, 2007, at 8:04 PM, Dr. Harold W. Schranz wrote:
Hi Alex
On 17/02/2007, at 2:23 PM, Alexander Ross wrote:
Harold,
Did you also check /Library/Application Support/TextMate? Also, do you have anything special with your installation of python? Perhaps a site_customize.py in your home directory?
Sorry I forgot to mention I don't have /Library/Application Support/TextMate directory.
Aside from the the default Apple install of python in /usr/bin/python, I have installed the recommended version of python 2.5 (Framework build) and it is linked to /usr/local/bin: /usr/local/bin/python -> ../../../Library/Frameworks/ Python.framework/Versions/2.5/bin/python (My default $PATH searches /usr/local/bin ahead of /usr/bin/ )
Can you use raw_input? Eg. try:
#!/usr/bin/python x = raw_input("Raw Input:") y = eval(x) print y
Using TextMate Version 1.5.4 (1360):
- Only response I get is:
PyMate r6190 running Python 2.3.5 (/usr/bin/python)
test_raw_input.py
and I have to stop the task before I can close the window.
- Running using the Run Script (Terminal) command works fine
(calls pythonw rather than python):
clear; cd '/Users/harry/Desktop'; 'pythonw' '/Users/harry/Desktop/ test_raw_input.py'; rm -f ''
- Running the old version (via pymate.py) works fine (though it
appears to disregard the /usr/bin/python (2.3) for the /usr/local/ bin/python (2.5) ): HIDE STDERR SHOW STDERR Python 2.5.0 - PyMate r5848 For comments contact the author. The regular Python interpreter can be invoked using ⌘⇧R.
test_raw_input.py
123 forcing redraw!!! don't remove Script terminated with success.
I noticed that in the pymate.py code there is an explicit function for putting up a CocoaDialog input box (via raw_input_replacement (prompt='')); is the same Cocoa dialog input box supposed to come up with the Ruby code pymate.rb? This failure may be the kernel of the problem ... is there a simple test whether my ruby install is working? /usr/bin/ruby -v ruby 1.8.2 (2004-12-25) [universal-darwin8.0] file /usr/bin/ruby /usr/bin/ruby: Mach-O universal binary with 2 architectures /usr/bin/ruby (for architecture i386): Mach-O executable i386 /usr/bin/ruby (for architecture ppc): Mach-O executable ppc
Sorry to present such an intractable enigmatic problem ...
Harry.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
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 ------------------------------------------------------------------------ ----
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@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 17. Feb 2007, at 08:15, Dr. Harold W. Schranz wrote:
I tried modifying sitecustomize.py (in the TextMate.app/Contents/ SharedSupport/Bundles/Python.tmbundle/Support/PyMate directory) as you suggested ...
Something you should also try is to run the simple script Alex gave on another user account / machine, just to be sure it is not a local problem.