[Pythonmac-SIG] Where's the output?
Wed, 1 May 2002 12:39:38 +0200
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)
= 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
> 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
> import time
> 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