summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Ditched '_find_SET()', since it was a no-value-added wrapper aroundGreg Ward2000-02-111-23/+14
| | | | | | | | 'get_msvc_paths()'. Renamed '_do_SET()' to 'set_path_env_var()', tweaked docstring, and cosmetically tweaked code. Stylistic changes to MSVCCompiler constructor (variable renaming and type consistency).
* Latest patch from Thomas Heller/Robin Becker:Greg Ward2000-02-111-47/+68
| | | | | | | | | | * tweak my docstrings * fix None returns to empty list * reshuffle responsibilities between '_find_exe()', '_find_SET()', and the MSVCCompiler constructor -- now the constructor worries about fetching the version list and determining the most recent one * added "/W3" compile option Also, I added/tweaked some docstrings.
* add loop handling viaJeremy Hylton2000-02-101-13/+63
| | | | | | | Loop object to handle StackRegs loops stack attr on CodeGenreeator to hold the current loop object add support for nodes While, Break, Continue
* add an __len__ to Set and StackJeremy Hylton2000-02-101-0/+4
|
* Added new exception classes:Barry Warsaw2000-02-101-28/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | NNTPError - derived from Exception, it's the base class for all other exceptions in this module NNTPReplyError - what used to be error_reply NNTPTemporaryError - what used to be error_temp NNTPPermanentError - what used to be error_perm NNTPProtocolError - what used to be error_proto NNTPDataError - what used to be error_data All the old names are retained for backwards compatibility; they point to the class that replaces them. Also, any code in this module that raises an exception, now does so with the exception class. NNTP.__init__(): Added a new optional argument `readermode', which is a flag that defaults to false. When set to true, the "mode reader" command is sent to the NNTP server before user authentication. Reader mode is sometimes necessary if you are connecting to an NNTP server on the local machine and intend to call reader-specific comamnds, such as `group'. If you get unexpected NNTPPermanentErrors, you might need to set readermode. Patch provided by Thomas Wouters (who include the standard disclaimer on is patches@python.org submission), and inspired by Jim Tittsler.
* add namespace attr to CodeGenerator, can be either MODULE_NAMESPACE orJeremy Hylton2000-02-101-22/+35
| | | | | | | | | | | FUNCTION_NAMESPACE. initialize in __init__ and reset in generateFunctionCode. replace direct issue of STORE_FAST, STORE_GLOBAL, etc. with call to storeName; same for loadName and deleteName the new {store,load,delete}Name methods use the namespace attr and the local variable stack to determine the correct bytecode to issue
* Untabify to pass the -tt test.Fred Drake2000-02-108-807/+807
|
* Detabify.Fred Drake2000-02-101-28/+28
| | | | I ran "expand" instead of using Skip's patch, but it's all the same.
* Make this pass the -tt test.Fred Drake2000-02-101-8/+8
|
* Stylistic changes to the registry-grovelling code: code formatting, changedGreg Ward2000-02-101-23/+51
| | | | function names, dbetter (hopefully) ocstrings, and comments.
* Typecheck 'output_dir' argument to compile/link methods.Greg Ward2000-02-101-0/+6
|
* Path from Thomas Heller: resurrect the .def file kludge while preserving theGreg Ward2000-02-101-2/+14
| | | | /export option mini-kludge.
* Patch from Thomas heller:Greg Ward2000-02-101-11/+33
| | | | | | | * don't need to mention python<ver>.lib -- it's done by a pragma * add debug flags for compile and link, and use them * fix 'link_shared_library()' to pass everything to 'link_shared_object()' * change filename when shared object with debug info (ugh)
* add ExampleASTVisitor:Jeremy Hylton2000-02-101-55/+199
| | | | | | | | | | | | | | | | | | | | | | * prints out examples of nodes that are handled by visitor. simply a development convenience remove NestedCodeGenerator -- it was bogus after all replace with generateFunctionCode, a method to call to generate code for a function instead of a top-level module fix impl of visitDiscard (most pop stack) emit lineno for pass handle the following new node types: Import, From, Getattr, Subscript, Slice, AssAttr, AssTuple, Mod, Not, And, Or, List LocalNameFinder: remove names declared as globals for locals PythonVMCode: pass arg names to constructor, force varnames to contain them all (even if they aren't referenced) add -q option on command line to disable stdout
* add remove method to setJeremy Hylton2000-02-101-0/+2
|
* Added 'debug' option, and changed compile/link calls to use it.Greg Ward2000-02-093-10/+30
|
* Added 'debug' option (just there for 'build_ext' and 'build_lib' commandsGreg Ward2000-02-091-0/+3
| | | | to fallback to if the user doesn't set it for those commands.
* Added 'debug' flags to compile and link methods, and added dummy code forGreg Ward2000-02-091-3/+13
| | | | | | someone who knows Windows/MSVC++ to come along and add the right flags. Comment noting that 'link_static_lib()' signature is inconsistent with the other compiler classes (uh-oh!)
* Added 'debug' flags to compile and link methods, and modified code to addGreg Ward2000-02-091-1/+13
| | | | '-g' flag to compiler/linker command lines when it's true.
* Added 'debug' flag to compile and link method signatures.Greg Ward2000-02-091-23/+43
| | | | | Doc fix: several paragraphs under 'link_static_lib()' moved to 'link_shared_lib()', where they belong.
* add optional verbose arg to walk function. it overrides the globalJeremy Hylton2000-02-081-29/+137
| | | | | | | | | | | | | | | | VERBOSE setting for the ASTVisitor add getopt handling for one or more -v args rename ForwardRef to StackRef, because it isn't necessarily directional CodeGenerator: * add assertStackEmpty method. prints warning if stack is not empty when it should be * define methods for AssName, UNARY_*, For PythonVMCode: * fix mix up between hasjrel and hasjabs for address calculation
* make all unary operators have a single child node called exprJeremy Hylton2000-02-081-4/+4
|
* add spaces to comparison names is not and not in to match disJeremy Hylton2000-02-081-2/+2
|
* now produces valid pyc files for a least a trivial subset of theJeremy Hylton2000-02-081-80/+306
| | | | | | | | | | | | | | | | | language. CodeGenerator: * modify to track stack depth * add emit method that call's PythonVMCode's makeCodeObject * thread filenames through in hackish way * set flags for code objects for modules and functions XXX the docs for the flags seem out of date and/or incomplete PythonVMCode: * add doc string describing the elements of a real code object LineAddrTable: * creates an lnotab (no quite correctly though)
* constants from transformerJeremy Hylton2000-02-081-0/+9
|
* move constants out of transformer so that they can be shared with astJeremy Hylton2000-02-082-8/+9
| | | | add varargs and kwargs attributes to Function nodes
* get_config_h_filename(): Support NT as well as Posix systems.Fred Drake2000-02-081-10/+14
| | | | | | | | | _init_nt(): Use get_config_h_filename() instead of figuring out the name directly. g['SO'] should be set to '.pyd'. Adjust some minor coding nits.
* Revised version (thank to Thomas Heller and Robin Becker) that tries a lotGreg Ward2000-02-081-3/+98
| | | | harder to find the MSVC compiler (mainly by using the registry).
* Ditch .def file kludge for (much smaller) /export option kludge.Greg Ward2000-02-081-12/+1
|
* Added test case for accessing gsbm database by key after it's closed;Fred Drake2000-02-071-1/+7
| | | | it should raise gdbm.error.
* Added 'libraries' option for use by the 'build_lib' command.Greg Ward2000-02-051-1/+2
| | | | Typo fix.
* Run the 'build_lib' command before building extensions, if necessary.Greg Ward2000-02-051-0/+6
|
* New command to build C (and C++, hopefully) libraries needed by extensionsGreg Ward2000-02-052-0/+322
| | | | in the current distribution: motivated by PIL's libImaging.
* Tweaked various comments, docstrings, and error messages.Greg Ward2000-02-051-2/+12
|
* rapid evolution towards producing real .pyc files (even though I don'tJeremy Hylton2000-02-041-11/+176
| | | | | | | | | | | | | | | | | handle most of the language syntax yet) create NestedCodeGenerator used to generator the separate code object that needs to be passed as an argument to MAKE_FUNCTION when a def stmt is found (probably useful for class too) change CodeGenerator.visitFunction to use the NestedCG add CompiledModule class to handle creation of .pyc (pretty minimal for now) add makeCodeObject method to PythonVMCode that replaces symbolic names with indexes into slots of the code code. the design of this class will probably need to be revised.
* Added a simple test program to disassemble a file, invoked as __main__.Guido van Rossum2000-02-041-0/+27
|
* Actually, the previous batch's comment should have been different;Guido van Rossum2000-02-0420-48/+99
| | | | | | | | | | *this* set of patches is Ka-Ping's final sweep: The attached patches update the standard library so that all modules have docstrings beginning with one-line summaries. A new docstring was added to formatter. The docstring for os.py was updated to mention nt, os2, ce in addition to posix, dos, mac.
* The third and final doc-string sweep by Ka-Ping Yee.Guido van Rossum2000-02-0429-829/+942
| | | | | | | | The attached patches update the standard library so that all modules have docstrings beginning with one-line summaries. A new docstring was added to formatter. The docstring for os.py was updated to mention nt, os2, ce in addition to posix, dos, mac.
* More trivial comment -> docstring transformations by Ka-Ping Yee,Guido van Rossum2000-02-0430-1823/+1578
| | | | | | | | | | | | | | | | | | who writes: Here is batch 2, as a big collection of CVS context diffs. Along with moving comments into docstrings, i've added a couple of missing docstrings and attempted to make sure more module docstrings begin with a one-line summary. I did not add docstrings to the methods in profile.py for fear of upsetting any careful optimizations there, though i did move class documentation into class docstrings. The convention i'm using is to leave credits/version/copyright type of stuff in # comments, and move the rest of the descriptive stuff about module usage into module docstrings. Hope this is okay.
* checking in initial weekend's workJeremy Hylton2000-02-042-0/+424
| | | | | | | | | compile.py: ASTVisitor framework plus bits of a code generator that should be bug-for-buf compatible with compile.c misc.py: Set and Stack helpers test.py: a bit of simple sample code that compile.py will work on
* make p2c a packageJeremy Hylton2000-02-041-0/+0
|
* three files from the p2c cvs tree. the message here indicates theJeremy Hylton2000-02-042-0/+1893
| | | | | | | | revision number the p2c cvs tree. COPYRIGHT: 1.1 ast.py: 1.3 transformer.py: 1.11
* Improved an error message.Greg Ward2000-02-031-2/+5
| | | | Announce when we start building each extension (better feedback).
* Changed 'compile()' method to compile files one-at-a-time -- gives betterGreg Ward2000-02-031-28/+21
| | | | | feedback and, theoretically, the opportunity to set compiler flags on a per-file basis.
* These modules are now declared obsolete.Fred Drake2000-02-033-0/+0
|
* # module filecmpGuido van Rossum2000-02-031-38/+299
| | | | | | | | | | | | | | | # combo of old cmp, cmpcache and dircmp with redundancies removed # # bugs fixed: # dircmp.dircmp was not ignoring IGNORES # old stuff could falsely report files as "identical" when contents actually differed # # enhancements: # dircmp has a more straightforward interface #cmp enhanced by Moshe Zadca #dircmp enhanced byGordon McMillan [some layout changes by GvR]
* In _fileobject, optimize read() a bit (it could be really slow), andGuido van Rossum2000-02-021-14/+30
| | | | remove "import string" -- use string methods instead!
* Optimize abspath() slightly for the case that win32api can't beGuido van Rossum2000-02-021-6/+11
| | | | imported; in that case, abspath is replaced by a fallback version.
* Make read() and readlines() conform more to the file object interface:Guido van Rossum2000-02-021-3/+3
| | | | | the default arg for read() is -1, not None, and readlines() has an optional argument (which for now is ignored).
* Mass patch by Ka-Ping Yee:Guido van Rossum2000-02-0218-2642/+2640
| | | | | | | | | | | 1. Comments at the beginning of the module, before functions, and before classes have been turned into docstrings. 2. Tabs are normalized to four spaces. Also, removed the "remove" function from dircmp.py, which reimplements list.remove() (it must have been very old).