Using a shim allows us to catch when 1.8 of ruby is not present and provide other options. #ignore
Remove mention of subversion repository, for contributors see 'git log'. #ignore
* Use print function (supported back to Python 2.6) * Versioned import for urllib.quote / urllib.parse.quote * Updated except syntax * Declare a file encoding * Bump version number
With build 2.0-alpha.9517 a string value is not treated as a boolean. Presumably the value should be changed to ‘emptyLines’ but that will enable indent corrections for people using earlier builds, so we are delaying that change.
While this works for it's intended purpose (elif/else) it gets triggered in too many other places to be functional. Since we can't currently tell if we are on a line with an elif/else we have to remove this. This reverts commit ef08362.
Although we have “indent as you type” disabled for Python, we should still strive to have correct indent patterns since we estimate indent after pressing return and (recently) typing a colon.
Since we have disabled indent-as-you-type for Python, we don’t get the automatic decrease of indent when typing the else keyword in an indented if block. This commit adds the colon as a special case for triggering automatic indent of the current line. Ideally there would be an option to only partially disable TextMate’s indent-as-you-type so that this macro was not required.
This allows manually typing the end of the string without getting four quotes, fixes #29.
We can now accomplish the same with left/right scope matches.
Per [the url scheme](http://blog.macromates.com/2007/the-textmate-url-scheme/).
The issue that caused this to be needed has been fixed in e62bab2. The exception catcher still does not work under Python 3 but it no longer causes an exception itself.
Every time TextMate2 updates (and refreshes this file), I get the following error running in-app with Python3 (Python works fine). Error in sitecustomize; set PYTHONVERBOSE for traceback: ValueError: list.remove(x): x not in list It looks like my sitecustomize is being run twice with Python3 (lines 20-25), which is provoking the error; the `os.environ['TM_BUNDLE_SUPPORT']` is removed the first time, so it gives an error trying to remove it the second. This problem has also been looked at [here](Homebrew/homebrew#16848) and [here](https://github.com/textmate/textmate/issues/812).
This is compatible with Python 2.6 and higher, more info: http://www.python.org/dev/peps/pep-3110/#implementation
This is to prevent false positives when tabbing within a string, especially when inside another snippet. Fixes #26.
This is usable in any document provided the `py` trigger is at the very start of the document.
10.7 and 10.8 only include ruby 1.8, so all bundle items have been written to work with that. Optionally supporting ruby 1.9 and 2.0 is problematic as these versions are not fully backwards compatible. #ignore
This is a crude heuristic to test if the user is using Python3, for which our ‘sitecustomize.py’ (used to catch exceptions and present a nice hyperlinked stack trace) does not work. Closes textmate/textmate#812.
Incase of errors from ‘eval’ we simply show a tool tip with what we tried to evaluate rather than try to dump the stack. The stack dump code wasn’t working, closes #15. When evaluating the selection we now insert ‘ #=> ’ before the result. There was a typo in the code so previously a newline was always inserted before the result.
Signed-off-by: Adam Vandenberg <email@example.com>
This way you can use a shebang that finds python via PATH (/usr/bin/env) but force TextMate to use a specific version.
Initially the Python script runner was written in Python and used execfile() to run the user script. This meant the runner itself had an entry on the stack trace which we explicitly had to skip.
I assume the reason links were skipped for “TM_FILE_IS_UNTITLED” was because the original author didn’t bother adding the code to remove the URL-part of the txmt://-links. Since TextMate.executor handles conversion of the links, there should be no need to special-case the “untitled document” case in this file.
This is a subtle change but it means that all but untitled documents are saved by TextMate where previously the command would always be responsible for saving, which meant encoding, callbacks, and similar weren’t respected, and there was a theoretical synchronization problem (TextMate having to get notified that the file changed on disk and notice that it was (now) identical to the modified version in memory).
This allows you do pass options to your preferred checker - for example, passing --max-line-length to newer pep8/flake8: TM_PYCHECKER = "flake8" TM_PYCHECKER_OPTIONS = "--max-line-length=110" Signed-off-by: Adam Vandenberg <firstname.lastname@example.org>
The variable being tested for is not what was actually being set.
* Added Python 3 builtin types * Removed some builtin functions because they're not "types" (classmethod etc). * Added Python 3.3 exceptions.