[Python-checkins] CVS: python/dist/src/Misc NEWS,1.121,1.122

Martin v. Löwis loewis@users.sourceforge.net
Sun, 04 Feb 2001 14:37:58 -0800


Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv20564

Modified Files:
	NEWS 
Log Message:
Fix binfmt_register documentation to always register the right magic.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.121
retrieving revision 1.122
diff -C2 -r1.121 -r1.122
*** NEWS	2001/02/04 03:09:52	1.121
--- NEWS	2001/02/04 22:37:56	1.122
***************
*** 260,264 ****
    if they do not have a .pyc or .pyo extension. On Linux, after executing
  
!   echo ':pyc:M::\x87\xc6\x0d\x0a::/usr/local/bin/python:' > /proc/sys/fs/binfmt_misc/register
  
    any byte code file can be used as an executable (i.e. as an argument
--- 260,267 ----
    if they do not have a .pyc or .pyo extension. On Linux, after executing
  
! import imp,sys,string
! magic = string.join(["\\x%.2x" % ord(c) for c in imp.get_magic()],"")
! reg = ':pyc:M::%s::%s:' % (magic, sys.executable)
! open("/proc/sys/fs/binfmt_misc/register","wb").write(reg)
  
    any byte code file can be used as an executable (i.e. as an argument