]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
"'foo' in str" not implemented in Python 2.2, only single character lookup
authorKurt B. Kaiser <kbk@shore.net>
Fri, 20 Dec 2002 17:18:03 +0000 (17:18 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Fri, 20 Dec 2002 17:18:03 +0000 (17:18 +0000)
Lib/idlelib/EditorWindow.py

index 4bd766d2fc2e1b70843cfe5ea64079ee989fa081..5368f27ec6b36ddfc3a98f19c18bddc5abae1255 100644 (file)
@@ -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: