]> granicus.if.org Git - file/commitdiff
PR/172: recognize python using "def name(arg, arg)"
authorChristos Zoulas <christos@zoulas.com>
Thu, 21 Jun 2012 01:12:51 +0000 (01:12 +0000)
committerChristos Zoulas <christos@zoulas.com>
Thu, 21 Jun 2012 01:12:51 +0000 (01:12 +0000)
magic/Magdir/python

index e339014e9cf61d90ec4c9a2e38278e4075d2776a..a882425fcf02e2d133fa585d40a923c08fc0a4c1 100644 (file)
@@ -1,6 +1,6 @@
 
 #------------------------------------------------------------------------------
-# $File: python,v 1.20 2011/12/13 13:53:14 christos Exp $
+# $File: python,v 1.21 2012/06/21 01:12:51 christos Exp $
 # python:  file(1) magic for python
 #
 # Outlook puts """ too for urgent messages
@@ -59,3 +59,8 @@
 !:mime text/x-python
 >&0    search/4096     finally:        Python script text executable
 !:mime text/x-python
+
+# def name(args, args):
+0      regex    \^(\ |\\t)*def\ +[a-zA-Z]+
+>&0    regex   \ *\\(([a-zA-Z]|,|\ )*\\):$ Python script text executable
+!:mime text/x-python