[Pythonmac-SIG] Where's the output?

Barron Snyder barronsnyder@mac.com
Wed, 1 May 2002 08:18:07 -0500


Well, I tried all of the submitted suggestions (Thanks everyone!) but 
everything was setup as it was supposed to be.

tmk's idea however, panned out. It was the line endings! In OS X, I use 
BBEdit and didn't realize that it was defaulting to mac line endings 
rather than unix line endings. Actually, until tmk mentioned it, I 
wasn't aware that you could save a file both ways in OS X. I thought 
everything was unix. But why doesn't this throw an error?

Thank you one and all!
-Barron


On Wednesday, May 1, 2002, at 05:39 AM, tmk wrote:

> I'll also add this one:
>
> Check that your file is saved with Unix line endings. (I'll must 
> confess that i've been bitten by this one more than once,  and the 
> symptoms where the ones you describe)
>
> HTH,
>
> = tmk =
>
> On Wednesday, May 1, 2002, at 11:25 , Jack Jansen wrote:
>
>>
>> On Wednesday, May 1, 2002, at 03:58 , SNYDER, BARRON F (AIT) wrote:
>>
>>>
>>> I'm probably missing the obvious but when I run a simple script at the
>>> command line, I see no output. What am I not doing?
>>>
>>> My script is as simple as:
>>>
>>> -----------------------------------
>>> #! /sw/bin/python
>>>
>>> print "hello"
>>> -----------------------------------
>>>
>>> At the command prompt %, I type: python hello.py
>>> but I see no results and no errors! If I enter the python interpreter,
>>> everything works fine.
>>
>> This should work, and it works fine for me (even though I'm not using 
>> the fink distribution it shouldn't make a difference, especially since 
>> you *do* get the right Python for interactive work).
>>
>> A few suggestion for tracking this:
>> - You have a #! line but say you're typing "python hello.py". Check 
>> that you're indeed using the Python you're expecting to use. "which 
>> python" will help you here.
>> - You don't have anything funny in your PYTHONSTARTUP or PYTHONHOME or 
>> so shell variable?
>> - Try "python -v hello.py" to see whether stderr is connected. Also, 
>> it may show problems during initialization.
>> - See whether it's actually the output getting lost, and not something 
>> else (like nothing hallening at all). Running a script like
>>     import time
>>     time.sleep(10)
>> should tell you (if it takes 10 seconds to come back then it probably 
>> did run).
>> - If interactive mode normally works, try "python -i hello.py" and see 
>> if you indeed get interactive mode, and maybe find out what is wrong 
>> with sys.stderr.
>>> --
>> - Jack Jansen        <Jack.Jansen@oratrix.com>        
>> http://www.cwi.nl/~jack -
>> - If I can't dance I don't want to be part of your revolution -- Emma 
>> Goldman -
>>
>>
>>
>> _______________________________________________
>> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>>
>
>
>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig