This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年06月04日 01:30 by cuulblu, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| python_error.jpg | cuulblu, 2012年06月04日 01:30 | .jpg of error | ||
| issue14997.patch | roger.serwy, 2012年06月05日 17:43 | review | ||
| Messages (10) | |||
|---|---|---|---|
| msg162246 - (view) | Author: (cuulblu) | Date: 2012年06月04日 01:30 | |
When using Idle any code I attempt to test I get a syntax error in the version number of the software. Please see the attached image. I have python installed on three machines and get the same error on all three. All three machines are Windows 7, 64 bit. Two have Intel CPU's. One is an AMD. I have tried reinstalling. Same results. |
|||
| msg162256 - (view) | Author: Ramchandra Apte (Ramchandra Apte) * | Date: 2012年06月04日 11:19 | |
Can you please run IDLE from the cmd line and send the output of it in the cmd line. |
|||
| msg162277 - (view) | Author: (cuulblu) | Date: 2012年06月04日 17:17 | |
"Can you please run IDLE from the cmd line and send the output of it in the cmd line." How do I do that? |
|||
| msg162294 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2012年06月04日 21:02 | |
Try launching Python 2.7 -> Python (command line), then in the interactive interpreter enter: import idlelib.PyShell idlelib.PyShell.main() Additional error messages may show up in the command line window. But also try renaming or deleting the .idlerc folder in your User folder. You may have an IDLE configuration file with an unexpected value. |
|||
| msg162351 - (view) | Author: (cuulblu) | Date: 2012年06月05日 15:18 | |
Ned I entered the commands you gave in the Python (command line). When Idle then opened I put test code in and am still getting the same error message. I deleted the idlerc folder. I am still getting the same error message. To expand on the problem, I get the error message when hitting the F5 key. If I hit Enter, instead of going to a new line it runs the code, but does not produce an error message. I get the same results on all three machines mentioned in my original post. I have also installed on an older XP machine, which produces the same results. It really makes no sense to me how 4 computers can all have the same issue. (Wanders off looking for the nearest wall) I downloaded the software from this website. I have tried both 32 bit and 64 bit versions. Currently the 64 bit versions are installed on the 64 bit machines. I hope to find a solution for this soon as I am getting behind on homework. |
|||
| msg162358 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2012年06月05日 17:13 | |
Thanks for the additional information; it's now clear what's going on. IDLE has two kinds of windows where code can be entered. When you launch IDLE, by default it opens with its shell window. This window is similar to running the Python interpreter in interactive mode, i.e. you can type in lines of Python code that are immediately executed and whose results are displayed. The other kind of window is an IDLE editor window in which you can edit a file containing Python code (either a new file or by opening an existing file). When you are ready to run the code in the selected editor window (there may be multiple ones open), you either use the Run menu command or its accelerator shortcut, F5. The results of running the file are also displayed in the IDLE shell window. What seems to be happening here is that, if are you in the shell window and enter some text and press F5 rather than return/enter to complete the line, IDLE mistakenly treats the shell window as if it were an editor window and prompts you to save and then tries to run the contents of the shell window. It shouldn't let you do that. Thanks for bringing that error to our attention! |
|||
| msg162360 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2012年06月05日 17:43 | |
The ScriptBinding extension is enabled for the shell. If the shell is in a modified state, then pressing F5 will bring up the save dialog (or auto-save), and then perform a syntax check. This is what cuublu experienced. Attached is a patch against 3.3a4 to disable ScriptBinding in the shell window. The patch is identical for 2.7 branch. |
|||
| msg171990 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年10月04日 19:49 | |
New changeset f6aaac839d83 by Andrew Svetlov in branch '3.2': Issue #14997: disable <F5> in idle shell window. http://hg.python.org/cpython/rev/f6aaac839d83 |
|||
| msg171991 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年10月04日 19:52 | |
New changeset 52ef53398096 by Andrew Svetlov in branch '3.3': Merge: Issue #14997: disable <F5> in idle shell window. http://hg.python.org/cpython/rev/52ef53398096 New changeset a40981be184d by Andrew Svetlov in branch 'default': Merge: Issue #14997: disable <F5> in idle shell window. http://hg.python.org/cpython/rev/a40981be184d New changeset 06772ba3d001 by Andrew Svetlov in branch '2.7': Issue #14997: disable <F5> in idle shell window. http://hg.python.org/cpython/rev/06772ba3d001 |
|||
| msg171992 - (view) | Author: Andrew Svetlov (asvetlov) * (Python committer) | Date: 2012年10月04日 19:53 | |
Fixed. Thanks to Roger Serwy. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:31 | admin | set | github: 59202 |
| 2012年10月04日 19:53:42 | asvetlov | set | status: open -> closed nosy: + asvetlov messages: + msg171992 resolution: fixed stage: patch review -> resolved |
| 2012年10月04日 19:52:39 | python-dev | set | messages: + msg171991 |
| 2012年10月04日 19:49:09 | python-dev | set | nosy:
+ python-dev messages: + msg171990 |
| 2012年10月01日 05:51:07 | roger.serwy | set | stage: needs patch -> patch review |
| 2012年06月15日 04:07:51 | terry.reedy | set | nosy:
+ terry.reedy |
| 2012年06月05日 17:43:32 | roger.serwy | set | files:
+ issue14997.patch nosy: + roger.serwy messages: + msg162360 keywords: + patch |
| 2012年06月05日 17:13:35 | ned.deily | set | versions:
+ Python 3.2, Python 3.3 title: Syntax Error in Python Version Number -> IDLE tries to run shell window if line is completed with F5 rather than Enter messages: + msg162358 type: compile error -> behavior stage: needs patch |
| 2012年06月05日 15:18:01 | cuulblu | set | messages: + msg162351 |
| 2012年06月04日 21:02:26 | ned.deily | set | nosy:
+ ned.deily messages: + msg162294 |
| 2012年06月04日 17:17:58 | cuulblu | set | messages: + msg162277 |
| 2012年06月04日 11:19:41 | Ramchandra Apte | set | nosy:
+ Ramchandra Apte messages: + msg162256 |
| 2012年06月04日 01:30:07 | cuulblu | create | |