[pywin32-bugs] [ pywin32-Bugs-1444381 ] lines may be mistaken for exception lines
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2006-03-06 20:04:52
|
Bugs item #1444381, was opened at 2006-03-06 20:04 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1444381&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: pythonwin Group: None Status: Open Resolution: None Priority: 5 Submitted By: Erik Andersén (erik_andersen) Assigned to: Nobody/Anonymous (nobody) Summary: lines may be mistaken for exception lines Initial Comment: PythonWin 2.4.2 (#67, Oct 30 2005, 16:11:18) [MSC v. 1310 32 bit (Intel)] on win32. Portions Copyright 1994-2004 Mark Hammond (mha...@sk...) - see 'Help/About PythonWin' for further copyright informatio >>> print 'File "<xxx>", line 1324' System will respond with "Cannot open this file" The cause is in winout.HandleSpecialLine. The input line matches the input line, so the interactive shell thinks is is a traceback line and tries to jump to the file <xxx>. Similarly, >>> s = 'File' + ' "<xxx>", line 1324' >>> s 'File "<xxx>", line 1324' >>> 1+1 gives the same error since HandleSpecialLine also tries the preceeding line. The solution is to add if line.startswith('>>>') or line. startswith('...'): return 0 near the beginning of HandleSpecialLine. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1444381&group_id=78018 |