Python/IPython support

View: New views
17 Messages — Rating Filter:   Alert me  

Python/IPython support

by John Finch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Works here.
Make sure you have the placed the shebang at the top of the file.

#!/usr/bin/env python

That should help.
Here's the full file:

#!/usr/bin/env python

print('test')


> I'm new to TextMate and would like to use it for my Python
> development, among other things.
>
> My issue is that I am not able to get the default Python bundle to
> function.
>
> I am running OS X 10.6.1 with python 2.6.1.
>
> For example if I create a new file named test.py, enter the text  
> "print
> ('test')", save it, and hit command-R, a window pops up saying the
> script has been run, but the output is blank.
>
> What am I missing here?
>
> My eventual desire is to be able to run the IPython bundle created by
> Matt as well, but I figured it was better to start with just the
> regular Python bundle and get that functioning first.
>
> Thank you for any help you can provide.


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: Python/IPython support

by Lawrence Johnston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, following these steps it doesn't here:

TextMate->New File
Copy your full file text into file (including shebang)
Save file as "test2.py"
Press Cmd-R to run script

It does not.

I just get a results window with an empty output.

On Oct 12, 2009, at 5:15 AM, John Finch wrote:

> Works here.
> Make sure you have the placed the shebang at the top of the file.
>
> #!/usr/bin/env python
>
> That should help.
> Here's the full file:
>
> #!/usr/bin/env python
>
> print('test')
>
>
>> I'm new to TextMate and would like to use it for my Python
>> development, among other things.
>>
>> My issue is that I am not able to get the default Python bundle to
>> function.
>>
>> I am running OS X 10.6.1 with python 2.6.1.
>>
>> For example if I create a new file named test.py, enter the text
>> "print
>> ('test')", save it, and hit command-R, a window pops up saying the
>> script has been run, but the output is blank.
>>
>> What am I missing here?
>>
>> My eventual desire is to be able to run the IPython bundle created by
>> Matt as well, but I figured it was better to start with just the
>> regular Python bundle and get that functioning first.
>>
>> Thank you for any help you can provide.
>
>
> _______________________________________________
> textmate mailing list
> textmate@...
> http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: Python/IPython support

by Lawrence Johnston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Another thing I just noticed, if after running the script with cmd-R I  
close and re-open the file, it comes up blank.

It appears to get overwritten whenever I run it with cmd-R.

On Oct 12, 2009, at 5:15 AM, John Finch wrote:

> Works here.
> Make sure you have the placed the shebang at the top of the file.
>
> #!/usr/bin/env python
>
> That should help.
> Here's the full file:
>
> #!/usr/bin/env python
>
> print('test')
>
>
>> I'm new to TextMate and would like to use it for my Python
>> development, among other things.
>>
>> My issue is that I am not able to get the default Python bundle to
>> function.
>>
>> I am running OS X 10.6.1 with python 2.6.1.
>>
>> For example if I create a new file named test.py, enter the text
>> "print
>> ('test')", save it, and hit command-R, a window pops up saying the
>> script has been run, but the output is blank.
>>
>> What am I missing here?
>>
>> My eventual desire is to be able to run the IPython bundle created by
>> Matt as well, but I figured it was better to start with just the
>> regular Python bundle and get that functioning first.
>>
>> Thank you for any help you can provide.
>
>
> _______________________________________________
> textmate mailing list
> textmate@...
> http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Parent Message unknown Re: Python/IPython support

by John Finch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok. Sounds like you might have a corruption in your setup. I'm using  
Snow Leopard with its own python 2.6.1 install.

My Textmate is version 1.5.9 (1510).

If I were you I'd delete my Textmate app as well as ~/Library/
Application Support/Textmate folder. Also check you have no Textmate  
folder under your Macintosh HD Library/Application Support folder.

Then re-install Textmate.

When you have the python file open make sure that Textmate has type  
python selected at the bottom of the editor window.

You might well have tried these measures but I cannot think of  
anything else that will help you. It does not seem to be a Snow  
Leopard issue.


On Oct 13, 2009, at 5:23 AM, textmate-request@...  
wrote:

> Another thing I just noticed, if after running the script with cmd-R I
> close and re-open the file, it comes up blank.
>
> It appears to get overwritten whenever I run it with cmd-R.
>
> On Oct 12, 2009, at 5:15 AM, John Finch wrote:
>
>> Works here.
>> Make sure you have the placed the shebang at the top of the file.
>>
>> #!/usr/bin/env python
>>
>> That should help.
>> Here's the full file:
>>
>> #!/usr/bin/env python
>>
>> print('test')
>


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: Python/IPython support

by Lawrence Johnston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just tried that, and unfortunately it didn't work.

The interesting thing is that I just tested the same way on my  
computer at work which is set up almost the same way and it worked  
without any issues at all.

I have done some things like restoring this machine from a Time  
Machine backup and some stuff like that, so maybe it's just time to  
wipe it and start clean.

Seems like a drastic step, but may be worth it in the long run.

Thanks for your help.

On Oct 13, 2009, at 4:50 AM, John Finch wrote:

> Ok. Sounds like you might have a corruption in your setup. I'm using
> Snow Leopard with its own python 2.6.1 install.
>
> My Textmate is version 1.5.9 (1510).
>
> If I were you I'd delete my Textmate app as well as ~/Library/
> Application Support/Textmate folder. Also check you have no Textmate
> folder under your Macintosh HD Library/Application Support folder.
>
> Then re-install Textmate.
>
> When you have the python file open make sure that Textmate has type
> python selected at the bottom of the editor window.
>
> You might well have tried these measures but I cannot think of
> anything else that will help you. It does not seem to be a Snow
> Leopard issue.
>
>
> On Oct 13, 2009, at 5:23 AM, textmate-request@...
> wrote:
>
>> Another thing I just noticed, if after running the script with cmd-
>> R I
>> close and re-open the file, it comes up blank.
>>
>> It appears to get overwritten whenever I run it with cmd-R.
>>
>> On Oct 12, 2009, at 5:15 AM, John Finch wrote:
>>
>>> Works here.
>>> Make sure you have the placed the shebang at the top of the file.
>>>
>>> #!/usr/bin/env python
>>>
>>> That should help.
>>> Here's the full file:
>>>
>>> #!/usr/bin/env python
>>>
>>> print('test')
>>
>
>
> _______________________________________________
> textmate mailing list
> textmate@...
> http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: Python/IPython support

by Lawrence Johnston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, I just narrowed down the issue a bit further.

It turns out that the line reading "TextMate.save_current_document" in  
the Python->Run Script script was instead wiping out my test script  
and replacing it with a blank file. When this blank file then got run  
it of course returned no results.

So I commented out that line and instead set the save option to  
"Current File" which presumably achieves the same results without the  
odd side-effect.

I still don't understand exactly what caused the issue with the save  
method, and why I'm not able to reproduce it on my work computer with  
an extremely similar setup, but hopefully this will help anybody else  
who runs into the same issue down the road.

On Oct 13, 2009, at 4:50 AM, John Finch wrote:

> Ok. Sounds like you might have a corruption in your setup. I'm using
> Snow Leopard with its own python 2.6.1 install.
>
> My Textmate is version 1.5.9 (1510).
>
> If I were you I'd delete my Textmate app as well as ~/Library/
> Application Support/Textmate folder. Also check you have no Textmate
> folder under your Macintosh HD Library/Application Support folder.
>
> Then re-install Textmate.
>
> When you have the python file open make sure that Textmate has type
> python selected at the bottom of the editor window.
>
> You might well have tried these measures but I cannot think of
> anything else that will help you. It does not seem to be a Snow
> Leopard issue.
>
>
> On Oct 13, 2009, at 5:23 AM, textmate-request@...
> wrote:
>
>> Another thing I just noticed, if after running the script with cmd-
>> R I
>> close and re-open the file, it comes up blank.
>>
>> It appears to get overwritten whenever I run it with cmd-R.
>>
>> On Oct 12, 2009, at 5:15 AM, John Finch wrote:
>>
>>> Works here.
>>> Make sure you have the placed the shebang at the top of the file.
>>>
>>> #!/usr/bin/env python
>>>
>>> That should help.
>>> Here's the full file:
>>>
>>> #!/usr/bin/env python
>>>
>>> print('test')
>>
>
>
> _______________________________________________
> textmate mailing list
> textmate@...
> http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

TextMate IPython support

by Lawrence Johnston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just downloaded the TextMate IPython bundle using get bundles, and  
when I do the Open IPython command I get the following:

/Library/Python/2.6/site-packages/ipython-0.10-py2.6.egg/IPython/
Extensions/ipy_vimserver.py in <module>()
      74 import re
      75
---> 76 ERRCONDS = select.POLLHUP|select.POLLERR
      77 SERVER = None
      78 ip = IPython.ipapi.get()

AttributeError: 'module' object has no attribute 'POLLHUP'

I found this old post about a similar issue, but it doesn't appear to  
contain any resolution: http://groups.google.com/group/ipython-tmbundle/browse_thread/thread/41d3563a40967467

Does anybody have any suggestions about how to go about fixing this?

I'm running OS X 10.6.1/Python 2.6.1/IPython 0.10.

This is upgraded from OS X 10.5.x/Python 2.5.x/IPython 0.9 via the Mac  
OS install disk (OS X, Python) and easy_install (IPython), in case  
that has anything to do with it.

Thank you.

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: Python/IPython support

by Alex Ross-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In the bundle editor, find the “Run Script” command in the python  
bundle.  What is the “Input:” set to?  It should be “entire  
document”.  If it is set to “Nothing” that would explain why your  
document is erased by the call to Textmate.save_current_document.

If “input:” is set incorrectly, that would suggest you have some  
old, edited version of the python bundle in either /Library/
Application Support/TextMate or in ~/Library/Application Support/
TextMate.  You can just remove those directories to get the default  
behavior.

—Alex

On Oct 18, 2009, at 3:41 PM, unussum@... wrote:

> Well, I just narrowed down the issue a bit further.
>
> It turns out that the line reading "TextMate.save_current_document" in
> the Python->Run Script script was instead wiping out my test script
> and replacing it with a blank file. When this blank file then got run
> it of course returned no results.
>
> So I commented out that line and instead set the save option to
> "Current File" which presumably achieves the same results without the
> odd side-effect.
>
> I still don't understand exactly what caused the issue with the save
> method, and why I'm not able to reproduce it on my work computer with
> an extremely similar setup, but hopefully this will help anybody else
> who runs into the same issue down the road.
>
> On Oct 13, 2009, at 4:50 AM, John Finch wrote:
>
>> Ok. Sounds like you might have a corruption in your setup. I'm using
>> Snow Leopard with its own python 2.6.1 install.
>>
>> My Textmate is version 1.5.9 (1510).
>>
>> If I were you I'd delete my Textmate app as well as ~/Library/
>> Application Support/Textmate folder. Also check you have no Textmate
>> folder under your Macintosh HD Library/Application Support folder.
>>
>> Then re-install Textmate.
>>
>> When you have the python file open make sure that Textmate has type
>> python selected at the bottom of the editor window.
>>
>> You might well have tried these measures but I cannot think of
>> anything else that will help you. It does not seem to be a Snow
>> Leopard issue.
>>
>>
>> On Oct 13, 2009, at 5:23 AM, textmate-request@...
>> wrote:
>>
>>> Another thing I just noticed, if after running the script with cmd-
>>> R I
>>> close and re-open the file, it comes up blank.
>>>
>>> It appears to get overwritten whenever I run it with cmd-R.
>>>
>>> On Oct 12, 2009, at 5:15 AM, John Finch wrote:
>>>
>>>> Works here.
>>>> Make sure you have the placed the shebang at the top of the file.
>>>>
>>>> #!/usr/bin/env python
>>>>
>>>> That should help.
>>>> Here's the full file:
>>>>
>>>> #!/usr/bin/env python
>>>>
>>>> print('test')
>>>
>>
>>
>> _______________________________________________
>> textmate mailing list
>> textmate@...
>> http://lists.macromates.com/listinfo/textmate
>
>
> _______________________________________________
> textmate mailing list
> textmate@...
> http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: Python/IPython support

by Lawrence Johnston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That doesn't seem to be it. Input is (correctly) set to "Entire  
Document".


On Oct 18, 2009, at 5:53 PM, Alex Ross wrote:

> In the bundle editor, find the “Run Script” command in the python
> bundle.  What is the “Input:” set to?  It should be “entire
> document”.  If it is set to “Nothing” that would explain why your
> document is erased by the call to Textmate.save_current_document.
>
> If “input:” is set incorrectly, that would suggest you have some
> old, edited version of the python bundle in either /Library/
> Application Support/TextMate or in ~/Library/Application Support/
> TextMate.  You can just remove those directories to get the default
> behavior.
>
> —Alex
>
> On Oct 18, 2009, at 3:41 PM, unussum@... wrote:
>
>> Well, I just narrowed down the issue a bit further.
>>
>> It turns out that the line reading "TextMate.save_current_document"  
>> in
>> the Python->Run Script script was instead wiping out my test script
>> and replacing it with a blank file. When this blank file then got run
>> it of course returned no results.
>>
>> So I commented out that line and instead set the save option to
>> "Current File" which presumably achieves the same results without the
>> odd side-effect.
>>
>> I still don't understand exactly what caused the issue with the save
>> method, and why I'm not able to reproduce it on my work computer with
>> an extremely similar setup, but hopefully this will help anybody else
>> who runs into the same issue down the road.
>>
>> On Oct 13, 2009, at 4:50 AM, John Finch wrote:
>>
>>> Ok. Sounds like you might have a corruption in your setup. I'm using
>>> Snow Leopard with its own python 2.6.1 install.
>>>
>>> My Textmate is version 1.5.9 (1510).
>>>
>>> If I were you I'd delete my Textmate app as well as ~/Library/
>>> Application Support/Textmate folder. Also check you have no Textmate
>>> folder under your Macintosh HD Library/Application Support folder.
>>>
>>> Then re-install Textmate.
>>>
>>> When you have the python file open make sure that Textmate has type
>>> python selected at the bottom of the editor window.
>>>
>>> You might well have tried these measures but I cannot think of
>>> anything else that will help you. It does not seem to be a Snow
>>> Leopard issue.
>>>
>>>
>>> On Oct 13, 2009, at 5:23 AM, textmate-request@...
>>> wrote:
>>>
>>>> Another thing I just noticed, if after running the script with cmd-
>>>> R I
>>>> close and re-open the file, it comes up blank.
>>>>
>>>> It appears to get overwritten whenever I run it with cmd-R.
>>>>
>>>> On Oct 12, 2009, at 5:15 AM, John Finch wrote:
>>>>
>>>>> Works here.
>>>>> Make sure you have the placed the shebang at the top of the file.
>>>>>
>>>>> #!/usr/bin/env python
>>>>>
>>>>> That should help.
>>>>> Here's the full file:
>>>>>
>>>>> #!/usr/bin/env python
>>>>>
>>>>> print('test')
>>>>
>>>
>>>
>>> _______________________________________________
>>> textmate mailing list
>>> textmate@...
>>> http://lists.macromates.com/listinfo/textmate
>>
>>
>> _______________________________________________
>> textmate mailing list
>> textmate@...
>> http://lists.macromates.com/listinfo/textmate
>
>
> _______________________________________________
> textmate mailing list
> textmate@...
> http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: Python/IPython support

by Alex Ross-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Can you make yourself a new user account and test to see if you can  
use the command properly there?

—Alex

On Oct 18, 2009, at 6:32 PM, unussum@... wrote:

> That doesn't seem to be it. Input is (correctly) set to "Entire
> Document".
>
>
> On Oct 18, 2009, at 5:53 PM, Alex Ross wrote:
>
>> In the bundle editor, find the “Run Script” command in the python
>> bundle.  What is the “Input:” set to?  It should be “entire
>> document”.  If it is set to “Nothing” that would explain why your
>> document is erased by the call to Textmate.save_current_document.
>>
>> If “input:” is set incorrectly, that would suggest you have some
>> old, edited version of the python bundle in either /Library/
>> Application Support/TextMate or in ~/Library/Application Support/
>> TextMate.  You can just remove those directories to get the default
>> behavior.
>>
>> —Alex
>>
>> On Oct 18, 2009, at 3:41 PM, unussum@... wrote:
>>
>>> Well, I just narrowed down the issue a bit further.
>>>
>>> It turns out that the line reading "TextMate.save_current_document"
>>> in
>>> the Python->Run Script script was instead wiping out my test script
>>> and replacing it with a blank file. When this blank file then got  
>>> run
>>> it of course returned no results.
>>>
>>> So I commented out that line and instead set the save option to
>>> "Current File" which presumably achieves the same results without  
>>> the
>>> odd side-effect.
>>>
>>> I still don't understand exactly what caused the issue with the save
>>> method, and why I'm not able to reproduce it on my work computer  
>>> with
>>> an extremely similar setup, but hopefully this will help anybody  
>>> else
>>> who runs into the same issue down the road.
>>>
>>> On Oct 13, 2009, at 4:50 AM, John Finch wrote:
>>>
>>>> Ok. Sounds like you might have a corruption in your setup. I'm  
>>>> using
>>>> Snow Leopard with its own python 2.6.1 install.
>>>>
>>>> My Textmate is version 1.5.9 (1510).
>>>>
>>>> If I were you I'd delete my Textmate app as well as ~/Library/
>>>> Application Support/Textmate folder. Also check you have no  
>>>> Textmate
>>>> folder under your Macintosh HD Library/Application Support folder.
>>>>
>>>> Then re-install Textmate.
>>>>
>>>> When you have the python file open make sure that Textmate has type
>>>> python selected at the bottom of the editor window.
>>>>
>>>> You might well have tried these measures but I cannot think of
>>>> anything else that will help you. It does not seem to be a Snow
>>>> Leopard issue.
>>>>
>>>>
>>>> On Oct 13, 2009, at 5:23 AM, textmate-request@...
>>>> wrote:
>>>>
>>>>> Another thing I just noticed, if after running the script with  
>>>>> cmd-
>>>>> R I
>>>>> close and re-open the file, it comes up blank.
>>>>>
>>>>> It appears to get overwritten whenever I run it with cmd-R.
>>>>>
>>>>> On Oct 12, 2009, at 5:15 AM, John Finch wrote:
>>>>>
>>>>>> Works here.
>>>>>> Make sure you have the placed the shebang at the top of the file.
>>>>>>
>>>>>> #!/usr/bin/env python
>>>>>>
>>>>>> That should help.
>>>>>> Here's the full file:
>>>>>>
>>>>>> #!/usr/bin/env python
>>>>>>
>>>>>> print('test')
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> textmate mailing list
>>>> textmate@...
>>>> http://lists.macromates.com/listinfo/textmate
>>>
>>>
>>> _______________________________________________
>>> textmate mailing list
>>> textmate@...
>>> http://lists.macromates.com/listinfo/textmate
>>
>>
>> _______________________________________________
>> textmate mailing list
>> textmate@...
>> http://lists.macromates.com/listinfo/textmate
>
>
> _______________________________________________
> textmate mailing list
> textmate@...
> http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: Python/IPython support

by Lawrence Johnston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Good call, sir.

The Run Script command functions perfectly fine under a different user  
account.

If it helps, I also found that the Math->Evaluate Line command also  
does not function properly under my user account. It just adds the  
equals sign but omits any result (e.g. "2 + 3" becomes "2 + 3 = ").  
This also behaves properly under the alternate account.

What might be causing this behavior?


On Oct 18, 2009, at 8:09 PM, Alex Ross wrote:

> Can you make yourself a new user account and test to see if you can
> use the command properly there?
>
> —Alex
>
> On Oct 18, 2009, at 6:32 PM, unussum@... wrote:
>
>> That doesn't seem to be it. Input is (correctly) set to "Entire
>> Document".
>>
>>
>> On Oct 18, 2009, at 5:53 PM, Alex Ross wrote:
>>
>>> In the bundle editor, find the “Run Script” command in the python
>>> bundle.  What is the “Input:” set to?  It should be “entire
>>> document”.  If it is set to “Nothing” that would explain why your
>>> document is erased by the call to Textmate.save_current_document.
>>>
>>> If “input:” is set incorrectly, that would suggest you have some
>>> old, edited version of the python bundle in either /Library/
>>> Application Support/TextMate or in ~/Library/Application Support/
>>> TextMate.  You can just remove those directories to get the default
>>> behavior.
>>>
>>> —Alex
>>>
>>> On Oct 18, 2009, at 3:41 PM, unussum@... wrote:
>>>
>>>> Well, I just narrowed down the issue a bit further.
>>>>
>>>> It turns out that the line reading "TextMate.save_current_document"
>>>> in
>>>> the Python->Run Script script was instead wiping out my test script
>>>> and replacing it with a blank file. When this blank file then got
>>>> run
>>>> it of course returned no results.
>>>>
>>>> So I commented out that line and instead set the save option to
>>>> "Current File" which presumably achieves the same results without
>>>> the
>>>> odd side-effect.
>>>>
>>>> I still don't understand exactly what caused the issue with the  
>>>> save
>>>> method, and why I'm not able to reproduce it on my work computer
>>>> with
>>>> an extremely similar setup, but hopefully this will help anybody
>>>> else
>>>> who runs into the same issue down the road.
>>>>
>>>> On Oct 13, 2009, at 4:50 AM, John Finch wrote:
>>>>
>>>>> Ok. Sounds like you might have a corruption in your setup. I'm
>>>>> using
>>>>> Snow Leopard with its own python 2.6.1 install.
>>>>>
>>>>> My Textmate is version 1.5.9 (1510).
>>>>>
>>>>> If I were you I'd delete my Textmate app as well as ~/Library/
>>>>> Application Support/Textmate folder. Also check you have no
>>>>> Textmate
>>>>> folder under your Macintosh HD Library/Application Support folder.
>>>>>
>>>>> Then re-install Textmate.
>>>>>
>>>>> When you have the python file open make sure that Textmate has  
>>>>> type
>>>>> python selected at the bottom of the editor window.
>>>>>
>>>>> You might well have tried these measures but I cannot think of
>>>>> anything else that will help you. It does not seem to be a Snow
>>>>> Leopard issue.
>>>>>
>>>>>
>>>>> On Oct 13, 2009, at 5:23 AM, textmate-request@...
>>>>> wrote:
>>>>>
>>>>>> Another thing I just noticed, if after running the script with
>>>>>> cmd-
>>>>>> R I
>>>>>> close and re-open the file, it comes up blank.
>>>>>>
>>>>>> It appears to get overwritten whenever I run it with cmd-R.
>>>>>>
>>>>>> On Oct 12, 2009, at 5:15 AM, John Finch wrote:
>>>>>>
>>>>>>> Works here.
>>>>>>> Make sure you have the placed the shebang at the top of the  
>>>>>>> file.
>>>>>>>
>>>>>>> #!/usr/bin/env python
>>>>>>>
>>>>>>> That should help.
>>>>>>> Here's the full file:
>>>>>>>
>>>>>>> #!/usr/bin/env python
>>>>>>>
>>>>>>> print('test')
>>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> textmate mailing list
>>>>> textmate@...
>>>>> http://lists.macromates.com/listinfo/textmate
>>>>
>>>>
>>>> _______________________________________________
>>>> textmate mailing list
>>>> textmate@...
>>>> http://lists.macromates.com/listinfo/textmate
>>>
>>>
>>> _______________________________________________
>>> textmate mailing list
>>> textmate@...
>>> http://lists.macromates.com/listinfo/textmate
>>
>>
>> _______________________________________________
>> textmate mailing list
>> textmate@...
>> http://lists.macromates.com/listinfo/textmate
>
>
> _______________________________________________
> textmate mailing list
> textmate@...
> http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: Python/IPython support

by Alex Ross-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 18, 2009, at 8:29 PM, unussum@... wrote:

> What might be causing this behavior?

It seems likely that you have something odd in your .bash_profile or  
your .profile.  Try moving these files out of ~/ and see if commands  
start working again.


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: Python/IPython support

by Lawrence Johnston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you Alex, I found the issue. You were most helpful.

On Oct 18, 2009, at 8:46 PM, Alex Ross wrote:

> On Oct 18, 2009, at 8:29 PM, unussum@... wrote:
>
>> What might be causing this behavior?
>
> It seems likely that you have something odd in your .bash_profile or
> your .profile.  Try moving these files out of ~/ and see if commands
> start working again.
>
>
> _______________________________________________
> textmate mailing list
> textmate@...
> http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: Python/IPython support

by Alex Ross-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 18, 2009, at 10:02 PM, unussum@... wrote:

> Thank you Alex, I found the issue. You were most helpful.

Just curious, but what was it?

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: Python/IPython support

by Lawrence Johnston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I made the mistake of setting an alias for bc, which I was not aware  
was the name of an existing unix tool (That's what I get for not  
capitalizing my personal aliases, I guess).

# ~/.profile
alias bc="echo ~/some/path"
alias cdbc="cd $(bc)"

Interestingly, if just an alias for bc is set, it still seems to work  
fine (is there some reason its use in TextMate would override the  
alias?). But as soon as $(bc) is utilized later in the file (in this  
case by my cdbc alias) various things become very weird under TextMate.




On Oct 19, 2009, at 4:43 AM, Alex Ross wrote:

> On Oct 18, 2009, at 10:02 PM, unussum@... wrote:
>
>> Thank you Alex, I found the issue. You were most helpful.
>
> Just curious, but what was it?
>
> _______________________________________________
> textmate mailing list
> textmate@...
> http://lists.macromates.com/listinfo/textmate


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Parent Message unknown Re: Python/IPython support

by Roberto Aguilar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Date: Mon, 19 Oct 2009 22:18:53 -0700
> From: unussum@...
> Subject: [TxMt] Re: Python/IPython support
> To: TextMate users <textmate@...>
> Message-ID: <09767F0B-381B-4D82-8A3F-ACCD8DCFDD2D@...>
> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes
>
> I made the mistake of setting an alias for bc, which I was not aware
> was the name of an existing unix tool (That's what I get for not
> capitalizing my personal aliases, I guess).
>
> # ~/.profile
> alias bc="echo ~/some/path"
> alias cdbc="cd $(bc)"

Your bc alias is just echoing the directory, which can be replaced by  
a variable:

bc="~/some/path"
alias cdbc="cd ${bc}"

That should solve your problem.

-Roberto.


_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate

Re: Python/IPython support

by Alex Ross-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 19, 2009, at 10:18 PM, unussum@... wrote:

> I made the mistake of setting an alias for bc, which I was not aware
> was the name of an existing unix tool (That's what I get for not
> capitalizing my personal aliases, I guess).
>
> # ~/.profile
> alias bc="echo ~/some/path"
> alias cdbc="cd $(bc)"
>
> Interestingly, if just an alias for bc is set, it still seems to work
> fine (is there some reason its use in TextMate would override the
> alias?). But as soon as $(bc) is utilized later in the file (in this
> case by my cdbc alias) various things become very weird under  
> TextMate.

Well, if you are calling this “cdbc” alias in your .profile that  
explains it.  The python bundle expects to be in the same directory as  
the script you are attempting to run.  When you change dirs, you are  
no longer in that directory and so you get undefined behavior.  Still,  
it doesn't seem like it should be nulling your file.  The  
save_current_document code reads STDIN (which TextMate is supposed to  
have written the document contents on) and then just writes that to  
TM_FILEPATH (the file you are currently editing).  Is (was?)  
your .profile reading stdin by any chance?  That would explain why  
save_current_document was erasing your file.

—Alex

_______________________________________________
textmate mailing list
textmate@...
http://lists.macromates.com/listinfo/textmate