[Tutor] Permissions Problem with Python

Peter Brown peterabrown at froggy.com.au
Mon Sep 15 07:07:42 EDT 2003


Program has already been chmod 755.

I type /usr/TP/foo.py at the bash prompt, this is the fully qualified path
- then it says no such file or directory.

/usr/bin/python runs I get an interactive >>>> prompts and can execute
commands, link to postgresql and create tables, do inserts within Python.

But I can't execute create_table.py. However, I can import it into python
interactive mode and it runs fine.

How do I set PYTHONPATH? In .bash_profile? I'm using RH9.

TIA


Peter

At 09:12 14/09/2003 -0400, you wrote:
>On Sunday 14 September 2003 08:20 am, Peter Brown wrote:
>
>> I have the following line at the start of  create_table.py  - #!
/usr/bin/env python.
>
>Here's the "d'oh!" question: Have you made this file executable? Chmod 
>755 or 555 on that file.  Also, if the file is not located in a 
>directory in your path, you'll need to prefix the file name with its 
>own path.  If the file is in your home directory, you could not execute 
>it just by #foo.py,  you would have to say #~/foo.py.
>
>
>-- 
>Todd Stephens
>ICQ# 3150790
>
>
>_______________________________________________
>Tutor maillist  -  Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
>
>




More information about the Tutor mailing list