On Sat, 26 Sep 2009 06:57:52 -0500, Peng Yu wrote: > Hi, > > It is strange that the file mode of .pyc files are changed to executable > (x mode) after the corresponding .py files have been run.
Are you sure? They don't on my system. [st...@sylar test]$ ls -l total 8 -rw-rw-r-- 1 steve steve 6 2009-09-26 23:06 test.py [st...@sylar test]$ python2.6 test.py [st...@sylar test]$ ls -l total 8 -rw-rw-r-- 1 steve steve 6 2009-09-26 23:06 test.py Running a .py file does not generally create a .pyc file. Normally you have to import it: [st...@sylar test]$ python2.6 Python 2.6.1 (r261:67515, Dec 24 2008, 00:33:13) [GCC 4.1.2 20070502 (Red Hat 4.1.2-12)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import test >>> exit() [st...@sylar test]$ ls -l total 16 -rw-rw-r-- 1 steve steve 6 2009-09-26 23:06 test.py -rw-rw-r-- 1 steve steve 94 2009-09-26 23:08 test.pyc Have you checked the umask of your system? -- Steven -- http://mail.python.org/mailman/listinfo/python-list