[TxMt] Python Bundle: Bug/Feature in Run Script (PyMate)

textmate_dharland textmate_dharland at trashmail.net
Wed Feb 6 03:45:08 UTC 2008


* I'm currently experimenting with TextMate as an alternative to xemacs and have encountered a problem in the python bundle.
* The problem is that PyMate is providing its own sitecustomize.py to hook various functions.
* This conflicts with our company's production/testing platforms.  They also uses sitecustomize to make site-specific customizations (such as hooking the logging module handlers etc).
* I'm sure our approach isn't unusual.  Unfortunately TextMate's usage of it for *application* specific reasons prevents our own site customisations from loading.
* Is a possible alternative for TextMate to use a launcher script approach? eg something that
  - hooks the desired functions as currently
  - hacks sys.argv and execfiles into the target file, such as

        # remove us from the argument list, set __file__ to be the script to run then exec it
        del sys.argv[0]
        __file__ = sys.argv[0]
        execfile(sys.argv[0])

This should have the same effect and ensure that a platforms sitecustomize is loaded.  I'm happy to work on and submit a patch to the appropriate people if desired (not sure who that would be)

derek.



-- 
E-Mail sent with anti-spam site TrashMail.net!
Free disposable email addresses: http://www.trashmail.net/



More information about the textmate mailing list