[Tutor] Permissions Problem

Lloyd Kvam pythontutor at venix.com
Mon Sep 15 19:28:39 EDT 2003


The python script was mangled by some Windows processing so that the lines
are marked with \r\n rather than \n.

You need to remove the extra \r characters from the script.  Believe it or not,
but that will foul up the shebang processing (at least on some systems).

Peter Brown wrote:

> bash-2.05b$ /usr/bin/python
> Python 2.2.2 (#1, Feb 24 2003, 19:13:11)
> [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> 
>>>>print repr(open('/usr/TP/upload.py', 'rb').read(160))
> 
> '#!/usr/bin/python\r\n# upload.py\r\n# program does two main tasks\r\n#
> 1. Seeks whether two files exist and then process file contents.\r\n#
> File YYYMMDD.sm is DDR list'
> 
> 
> bash-2.05b$ /usr/TP/upload.py
> : bad interpreter: No such file or directory
> bash-2.05b$ pwd
> /usr/TP
> bash-2.05b$ ls -al upload.py
> -rwxr-xr-x    1 postgres postgres     6945 Sep 16 08:31 upload.py
> bash-2.05b$
> 
> As you can see everything looks OK. /usr/TP is not home directory
> 
> What could be the problem?
> 
> Peter
> 
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
> 

-- 
Lloyd Kvam
Venix Corp.
1 Court Street, Suite 378
Lebanon, NH 03766-1358

voice:	603-443-6155
fax:	801-459-9582




More information about the Tutor mailing list