[Tutor] Invoking Python

Cédric Lucantis omer at no-log.org
Thu Jun 26 15:53:17 CEST 2008


Le Thursday 26 June 2008 15:37:01 kinuthiA muchanE, vous avez écrit :
> On Thu, 2008-06-26 at 12:00 +0200, tutor-request at python.org wrote:
> > Or more commonly add a first line like:
> >
> > #! /path/to/python/executable
> >
> > Then you can simply make the file executable and run it by typing its
> > name
> >
> > $ threeplusfour.py
>
> On my computer, running Linux Ubuntu, I always have to type
> ./threePlusFour.py to get it to run. Otherwise I get a not found
> command.

This is because on unix the current directory (.) is not in the PATH 
environment variable by default. You can set it if you want but there are 
some security problems with this so it's not recommended. Typing the 
leading './' quickly becomes automatic for unix users.

-- 
Cédric Lucantis


More information about the Tutor mailing list