From: Kurt B. Kaiser Date: Fri, 20 Dec 2002 17:18:03 +0000 (+0000) Subject: "'foo' in str" not implemented in Python 2.2, only single character lookup X-Git-Tag: v2.3c1~2936 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=83a3560527f9e62bce6adbc12b8ff6b57be8b1ac;p=thirdparty%2FPython%2Fcpython.git "'foo' in str" not implemented in Python 2.2, only single character lookup --- diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 4bd766d2fc2e..5368f27ec6b3 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -283,6 +283,7 @@ class EditorWindow: tkMessageBox.showinfo('Advice', "Don't Panic!", master=self.text) def view_readme(self, event=None): + print>>sys.__stderr__, "** __file__: ", __file__ fn=os.path.join(os.path.abspath(os.path.dirname(__file__)),'README.txt') textView.TextViewer(self.top,'IDLEfork - README',fn) @@ -438,7 +439,7 @@ class EditorWindow: f.close() except IOError: return False - return line.startswith('#!') and 'python' in line + return line.startswith('#!') and line.find('python') >= 0 def close_hook(self): if self.flist: