summaryrefslogtreecommitdiffstats
path: root/Lib/code.py
Commit message (Collapse)AuthorAgeFilesLines
* Merged revisions ↵Benjamin Peterson2009-11-251-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 75264,75268,75293,75318,75391-75392,75436,75478,75971,76003,76058,76140-76141,76231,76380,76428-76429 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r75264 | andrew.kuchling | 2009-10-05 17:30:22 -0500 (Mon, 05 Oct 2009) | 1 line Add various items ........ r75268 | andrew.kuchling | 2009-10-05 17:45:39 -0500 (Mon, 05 Oct 2009) | 1 line Remove two notes ........ r75293 | kristjan.jonsson | 2009-10-09 09:32:19 -0500 (Fri, 09 Oct 2009) | 2 lines http://bugs.python.org/issue7029 a non-default timer wasn't actually used by the individual Tests. ........ r75318 | benjamin.peterson | 2009-10-10 16:15:58 -0500 (Sat, 10 Oct 2009) | 1 line remove script which uses long gone module ........ r75391 | andrew.kuchling | 2009-10-13 10:49:33 -0500 (Tue, 13 Oct 2009) | 1 line Link to PEP ........ r75392 | andrew.kuchling | 2009-10-13 11:11:49 -0500 (Tue, 13 Oct 2009) | 1 line Various link, textual, and markup fixes ........ r75436 | benjamin.peterson | 2009-10-15 10:39:15 -0500 (Thu, 15 Oct 2009) | 1 line don't need to mess up sys.path ........ r75478 | senthil.kumaran | 2009-10-17 20:58:45 -0500 (Sat, 17 Oct 2009) | 3 lines Fix a typo. ........ r75971 | benjamin.peterson | 2009-10-30 22:56:15 -0500 (Fri, 30 Oct 2009) | 1 line add some checks for evaluation order with parenthesis #7210 ........ r76003 | antoine.pitrou | 2009-10-31 19:30:13 -0500 (Sat, 31 Oct 2009) | 6 lines Hopefully fix the buildbot problems on test_mailbox, by computing the maildir toc cache refresh date before actually refreshing the cache. (see #6896) ........ r76058 | benjamin.peterson | 2009-11-02 10:14:19 -0600 (Mon, 02 Nov 2009) | 1 line grant list.index() a more informative error message #7252 ........ r76140 | nick.coghlan | 2009-11-07 02:13:55 -0600 (Sat, 07 Nov 2009) | 1 line Add test for runpy.run_module package execution and use something other than logging as the example of a non-executable package ........ r76141 | nick.coghlan | 2009-11-07 02:15:01 -0600 (Sat, 07 Nov 2009) | 1 line Some minor cleanups to private runpy code and docstrings ........ r76231 | benjamin.peterson | 2009-11-12 17:42:23 -0600 (Thu, 12 Nov 2009) | 1 line this main is much more useful ........ r76380 | antoine.pitrou | 2009-11-18 14:20:46 -0600 (Wed, 18 Nov 2009) | 3 lines Mention Giampolo R's new FTP TLS support in the what's new file ........ r76428 | benjamin.peterson | 2009-11-19 20:15:50 -0600 (Thu, 19 Nov 2009) | 1 line turn goto into do while loop ........ r76429 | benjamin.peterson | 2009-11-19 20:56:43 -0600 (Thu, 19 Nov 2009) | 2 lines avoid doing an uneeded import in a function ........
* Fix issue #1707. When raw_input() was removed, it was incorrectly replacedGuido van Rossum2008-01-021-5/+4
| | | | | with sys.stdin.readline(). I wonder how many other places are affected by the same bug?
* Merged revisions 56492-56752 via svnmerge fromGuido van Rossum2007-08-051-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r56497 | kurt.kaiser | 2007-07-22 14:55:16 -0700 (Sun, 22 Jul 2007) | 4 lines In the case of syntax errors, in py3k format_exception_only() was including line number and position in the final line of the exception notification, duplicating info in previous lines. ........ r56501 | kurt.kaiser | 2007-07-22 19:35:50 -0700 (Sun, 22 Jul 2007) | 2 lines Hum, needed a newline in the last change. ........ r56536 | kurt.kaiser | 2007-07-24 19:06:48 -0700 (Tue, 24 Jul 2007) | 5 lines Not all instantiations of SyntaxError set the args attribute. e.g. symtable.c Modify format_exception_only() to get SyntaxError attributes directly instead of unpacking 'args'. ........ r56537 | kurt.kaiser | 2007-07-24 19:13:03 -0700 (Tue, 24 Jul 2007) | 3 lines Update doctest strings: traceback.py no longer prints redundant location information in the last line of the exception display. ........ r56627 | kurt.kaiser | 2007-07-29 21:06:57 -0700 (Sun, 29 Jul 2007) | 2 lines Interactive interpreter emulator (code.py) failing to print exceptions. ........ r56628 | kurt.kaiser | 2007-07-29 21:41:02 -0700 (Sun, 29 Jul 2007) | 2 lines Eliminate extra lines before and after tracebacks. ........ r56638 | kurt.kaiser | 2007-07-31 19:36:45 -0700 (Tue, 31 Jul 2007) | 3 lines Refactor syntax error display in shell and edit windows; move colorize_syntax_error() to EditorWindow; update to py3k. ........ r56685 | neal.norwitz | 2007-08-02 22:20:23 -0700 (Thu, 02 Aug 2007) | 10 lines Remove several h/w and o/s specific modules that are undocumented, obsolete, and/or not widely used: linuxaudiodev.c, sunaudiodev.c Lib/plat-sunos5/SUNAUDIODEV.py Lib/audiodev.py Tools/audiopy/audiopy Move Lib/toaiff.py to Demo. See PEP 3108 for most of the details. ........ r56686 | neal.norwitz | 2007-08-02 22:21:48 -0700 (Thu, 02 Aug 2007) | 4 lines Missed one module that should have been removed since it relied on audiodev which was removed. ........ r56748 | neal.norwitz | 2007-08-04 19:19:04 -0700 (Sat, 04 Aug 2007) | 1 line Make from X import * outside module scope an error. ........ r56750 | neal.norwitz | 2007-08-04 19:35:01 -0700 (Sat, 04 Aug 2007) | 1 line Use READONLY consistently instead of RO ........
* Kill off softspace completely (except in formatter.py which seems to haveGuido van Rossum2007-02-091-16/+0
| | | | | a different feature with the same name). The change to test_doctest.txt reduces the doctest failures to 3.
* Fix most trivially-findable print statements.Guido van Rossum2007-02-091-1/+1
| | | | | | | | | There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
* Patch #1550800: make exec a function.Georg Brandl2006-09-061-1/+1
|
* Get rid of a bunch more raw_input referencesNeal Norwitz2006-03-171-4/+6
|
* - Finally fixed the bug in compile() and exec where a string endingGuido van Rossum2003-02-131-1/+2
| | | | | | | | | with an indented code block but no newline would raise SyntaxError. This would have been a four-line change in parsetok.c... Except codeop.py depends on this behavior, so a compilation flag had to be invented that causes the tokenizer to revert to the old behavior; this required extra changes to 2 .h files, 2 .c files, and 2 .py files. (Fixes SF bug #501622.)
* Convert a pile of obvious "yes/no" functions to return bool.Tim Peters2002-04-041-4/+4
|
* make default banner match what the real interpreter displaysSkip Montanaro2002-03-251-1/+1
|
* remove unqualified excepts - catch ImportError when trying to importSkip Montanaro2002-03-251-7/+2
| | | | | | readline and get rid of string exception fallback when showing syntax errors. see bug 411881
* softspace(): be prepared to catch AttributeError as well as TypeErrorGuido van Rossum2001-09-181-1/+2
| | | | upon attempted attribute assignment. Caught by MWH, SF bug #462522.
* A fiddled version of the rest of Michael Hudson's SF patchTim Peters2001-08-171-3/+4
| | | | | #449043 supporting __future__ in simulated shells which implements PEP 264.
* InteractiveInterpreter.showsyntaxerror():Fred Drake2001-05-031-0/+1
| | | | | When replacing the exception object, be sure we stuff the new value in sys.last_value (which we already did for the original value).
* String method conversion.Eric S. Raymond2001-02-091-2/+1
|
* added __all__ lists to a number of Python modulesSkip Montanaro2001-01-201-0/+3
| | | | | | | | added test script and expected output file as well this closes patch 103297. __all__ attributes will be added to other modules without first submitting a patch, just adding the necessary line to the test script to verify more-or-less correct implementation.
* mwh@sourceforge found that UnicodeError can be raised by compiling.Guido van Rossum2001-01-151-1/+1
| | | | Its base class ValueError can be raised too, so catch that.
* Make the copyright message the same as for the "real" interpreter.Guido van Rossum2001-01-141-1/+2
|
* SF Patch #103227 by mwh: make code.py appreciate softspaceGuido van Rossum2001-01-131-0/+14
|
* Make Traceback header conform to new traceback ("innermost last" ->Guido van Rossum2000-12-271-1/+1
| | | | "most recent call last").
* Simple changes by Gerrit Holl - move author acknowledgements out ofGuido van Rossum2000-02-281-1/+2
| | | | docstrings into comments.
* Moved compile_command() to a file of its own (codeop.py).Guido van Rossum1998-10-221-82/+3
|
* Rename 'locals' argument to top-level interact() function to 'local'Guido van Rossum1998-10-191-3/+3
| | | | for b/w compatibility with 1.5.1.
* Reworked it quite a bit. There are now two classes: a base class,Guido van Rossum1998-09-221-102/+206
| | | | | | | | | | InteractiveInterpreter, which handles parsing and interpreter state but doesn't know deal with buffering or prompting or input file naming. And a derived class, InteractiveConsole, which adds buffering and prompting and supports setting the filename once. Also tweak the algorithm in compile_command() a bit so that input consisting of all blank lines or comments always succeeds immediately, and note the fact that apart from SyntaxError it can also raise OverflowError.
* Subsume the interact() function in a class. This should make itGuido van Rossum1998-06-231-42/+197
| | | | | possible to use this in PythonWin, and to replace Fredrik Lundh's PythonInterpreter class. Fredrik is credited with the class' API.
* Mass check-in after untabifying all files that need it.Guido van Rossum1998-03-261-45/+45
|
* Seems I've found a way to fix this.Guido van Rossum1998-01-141-3/+9
|
* Add Jeff Epler's interact() function. Note that it is broken.Guido van Rossum1997-10-071-0/+52
| | | | (It should probably be withdrawn :-( )
* Checking in new module code.py -- utilities dealing with code objects.Guido van Rossum1997-07-181-0/+52
Currently, contains one function: compile_command(), which helps determining whether a source string is complete, incomplete or in error. This is useful when writing your own version of the Python read-eval-print loop.