Movatterモバイル変換
[0]ホーム
Newbie Question
Steve Purcellstephen_purcell at yahoo.com
Mon Apr 16 04:52:25 EDT 2001
Gregory T. Weber wrote:> I just started with the Learning Python book and was not able to get one> of the simplest programs working. I suspect that the installation> is at fault and want to confirm before going any further. Using Python 2.0 on Solaris 2.6.>> The code is>> #! /usr/bin/python>> print 'First Program'>> At the command line this works fine>> > python first.py> First Program>> After making first.py executable I figured I could do this>> >first.py>> but I get the error>> print: Command not found.Here's a hint: tcsh% print 'First Program' print: Command not found.The problem appears to lie in the '#!' line -- your shell is ignoring itand trying to run the script itself.Try changing the first line to '#!/usr/bin/python'.-Steve-- Steve Purcell, PythangelistGet testing athttp://pyunit.sourceforge.net/Any opinions expressed herein are my own and not necessarily those of Yahoo
More information about the Python-listmailing list
[8]ページ先頭