Hello fellow Python Bundle users,
I've been learning more about the Ruby bundle, and I have some ideas on how to make the Python bundle better. Some of them are blatantly stolen from the Ruby bundle, some of them I came up independently myself when I was using BBEdit, and thought they would be useful in the Python bundle.
#1: Create Dictionary From: I thought Ruby could take the selected text and make a hash out of it. (looking in the TextMate book now of course I can't find it). I wrote something similar, turning the following text into a dictionary:
a = 1 b = 2
--> result: {'a': '1', 'b': '2'}
You'll find my script at the bottom of this email
#2: Support for syntax coloring doctests
Wouldn't it be cool to have doctests syntax colored like code, and not comments?
Likewise, it looks like the folding marker for Python comments folds on a blank line. That means folding doesn't work very well for doctests or comments with blank lines in it.
#3: super() in class snippet
It would be cool if the class snippet inserted super(...) into the constructor for the class. (Is this possible with clever mirroring?)
_______________________________
Bugs: * Evaluate Selection As Python doesn't work (Traceback (most recent call last): File "/tmp/temp_textmate.KE9sFL", line 5, in ? from traceback import format_exc ImportError: cannot import name format_exc )
* Documentation For Current Word doesn't work (global name sh is not defined)
_______________________________
Looking forward to everybody's thoughts on these improvements!, _Ryan Wilcox