summaryrefslogtreecommitdiffstats
path: root/Python/import.c
Commit message (Collapse)AuthorAgeFilesLines
* Remember source filename as <module>.__file__.Guido van Rossum1996-05-161-0/+3
|
* Under NT, interface to mysterious module registry. (Mark H.)Guido van Rossum1996-04-091-0/+8
|
* Change Mac creator from 'PYTH' to 'Pyth' -- 'PYTH' was already takenGuido van Rossum1996-02-211-1/+1
| | | | by someone else, 'Pyth' is now officially registered by the PSA.
* Removed unused variablesJack Jansen1995-10-031-3/+1
|
* add imp.get_frozen_object()Guido van Rossum1995-08-041-13/+54
|
* Undef 'argument' before including mac headersJack Jansen1995-07-281-0/+2
|
* never close the file in imp.load_...Guido van Rossum1995-07-261-6/+0
|
* keyword arguments and faster callsGuido van Rossum1995-07-181-2/+2
|
* new MAGIC; some changes to default files for imp.load_... functionsGuido van Rossum1995-07-071-8/+19
|
* Added PY_RESOURCE (mac only) to imp moduleJack Jansen1995-06-181-0/+7
|
* Check if we've already loaded a dynamic module under a different name.Sjoerd Mullender1995-06-121-2/+2
|
* magic number changes of CR/LF are swappedGuido van Rossum1995-02-191-1/+3
|
* Added hooks to support importing pyc code from a resource on the mac.Jack Jansen1995-02-151-7/+43
|
* init_frozen non-static, frozenmain.c not in Makefile any moreGuido van Rossum1995-02-071-1/+3
|
* fix glaring bug in get_magicGuido van Rossum1995-01-301-2/+2
|
* don't dictclear deleted modules in doneimportGuido van Rossum1995-01-261-17/+22
|
* fix import related leaksGuido van Rossum1995-01-201-12/+22
|
* use getbuiltins() everywhere, it defaults to getbuiltidict()Guido van Rossum1995-01-121-1/+1
|
* __builtins__ mods (and sys_checkinterval for ceval.c)Guido van Rossum1995-01-091-0/+5
|
* Added 1995 to copyright message.Guido van Rossum1995-01-041-2/+2
| | | | | | bltinmodule.c: fixed coerce() nightmare in ternary pow(). modsupport.c (initmodule2): pass METH_FREENAME flag to newmethodobject(). pythonrun.c: move flushline() into and around print_error().
* Lots of changes, most minor (fatal() instead of abort(), use ofGuido van Rossum1995-01-021-568/+681
| | | | | | err_fetch/err_restore and so on). But... NOTE: import.c has been rewritten and all the DL stuff is now in the new file importdl.c.
* Added comment symbols around word after #endif.Sjoerd Mullender1994-12-141-1/+1
|
* Fix various potential buffer overrun problems.Guido van Rossum1994-09-261-9/+18
|
* * Import/pythonrun.h, Python/{import,pythonrun}.c,Guido van Rossum1994-09-141-0/+11
| | | | | | mac/macsetfiletype.c: changes by Jack to execute .pyc file passed as command line argument. On the Mac .pyc files are given a special type so they can be double-clicked
* Mods for HP-UX dynamic loading.Guido van Rossum1994-09-121-1/+42
|
* * Python/import.c: support *.o/*.so as alternative forGuido van Rossum1994-08-291-68/+332
| | | | | | | | | | | | | | *module.o/*module.so * Python/import.c: if initializing a module did not enter the module into sys.modules, it may have raised an exception -- don't override this exception. Merged NT changes * Python/import.c: add lost NT-specific code back in Fixed NT changes
* * import.c (get_module): pass .py filename to parse_file, not .pyc filename!Guido van Rossum1993-11-301-3/+5
| | | | | | | | | | | * funcobject.c (func_repr): don't call getstringvalue(None) for anonymous functions. * bltinmodule.c: removed lambda (which is now a built-in function); removed implied lambda for string arg to filter/map/reduce. * Grammar, graminit.[ch], compile.[ch]: replaced lambda as built-in function by lambda as grammar entity: instead of "lambda('x: x+1')" you write "lambda x: x+1". * Xtmodule.c (checkargdict): return 0, not NULL, for error.
* * import.c (get_module): total rewrite, to ensure proper search order: forGuido van Rossum1993-11-171-172/+185
| | | | | | | | | | | | | each dir in sys.path, try each possible extension. (Note: C extensions are loaded before Python modules in the same directory, to allow having a C version used when dynamic loading is supported and a Python version as a back-up.) * import.c (reload_module): test for error from getmodulename() * moduleobject.c: implement module name as dict entry '__name__' instead of special-casing it in module_getattr(); this way a module (or function!) can access its own module name, and programs that know what they are doing can rename modules. * stdwinmodule.c (initstdwin): strip ".py" suffix of argv[0].
* * filemodule.c: added writelines() -- analogous to readlines()Guido van Rossum1993-10-251-1/+2
| | | | * import.c: fixed core dump when out-of-date .pyc file encountered (again!)
* import.c: When something is wrong with the .pyc, properly open the .pySjoerd Mullender1993-10-251-26/+31
| | | | | file. object.c: Write allocation statistics to stderr.
* * import.c (MAGIC): Changed magic word to avoid confusion about execGuido van Rossum1993-10-221-1/+1
| | | | | | | function vs. exec statement * bltinmodule.c: renamed the module to __builtin__. * posixmodule.c (posix_execv): renamed exec --> execv since it is now a reserved word.
* * stdwinmodule.c (stdwin_done): interface to shutdown stdwin (now this isGuido van Rossum1993-10-181-6/+8
| | | | | | | | | no longer done by config.c). * stdwinmodule.c (initstdwin), config.c (initall): get command line arguments from sys.argv instead of special-casing stdwin in config.c * import.c (get_module): fix core dump when foomodule.o does not define initfoo(). * ChangeLog: documented changes by Sjoerd.
* Makefile, import.c: Lance's alternative module search (allow .pyc fileGuido van Rossum1993-10-151-98/+112
| | | | | | | | | | without .py file); Bill's dynamic loading for SunOS using shared libraries. pwdmodule.c (mkgrent): remove DECREF of uninitialized variable. classobject.c (instance_getattr): Fix case when class lookup returns unbound method instead of function.
* * classobject.c: in instance_getattr, don't make a method out of aGuido van Rossum1993-05-251-2/+2
| | | | | | | | | | function found as instance data. * socketmodule.c: added 'flags' argument sendto/recvfrom, rewrite argument parsing in send/recv. * More changes related to access (terminology change: owner instead of class; allow any object as owner; local/global variables are owned by their dictionary, only class/instance data is owned by the class; "from...import *" now only imports objects with public access; etc.)
* Access checks now work, at least for instance data (not for methodsGuido van Rossum1993-05-201-2/+2
| | | | | | | yet). The class is now passed to eval_code and stored in the current frame. It is also stored in instance method objects. An "unbound" instance method is now returned when a function is retrieved through "classname.funcname", which when called passes the class to eval_code.
* Several changes in one:Guido van Rossum1993-05-191-31/+12
| | | | | | | | | | | | | | | | (1) dictionaries/mappings now have attributes values() and items() as well as keys(); at the C level, use the new function mappinggetnext() to iterate over a dictionary. (2) "class C(): ..." is now illegal; you must write "class C: ...". (3) Class objects now know their own name (finally!); and minor improvements to the way how classes, functions and methods are represented as strings. (4) Added an "access" statement and semantics. (This is still experimental -- as long as you don't use the keyword 'access' nothing should be changed.)
* Support for frozen scripts; added -i option.Guido van Rossum1993-04-011-2/+40
|
* Changes to speed up local variables enormously, by avoiding dictionaryGuido van Rossum1993-03-301-1/+1
| | | | | | lookup (opcode.h, ceval.[ch], compile.c, frameobject.[ch], pythonrun.c, import.c). The .pyc MAGIC number is changed again. Added get_menu_text to flmodule.
* * Changed all copyright messages to include 1993.Guido van Rossum1993-03-291-2/+2
| | | | | | | | | | | | | | | | | * Stubs for faster implementation of local variables (not yet finished) * Added function name to code object. Print it for code and function objects. THIS MAKES THE .PYC FILE FORMAT INCOMPATIBLE (the version number has changed accordingly) * Print address of self for built-in methods * New internal functions getattro and setattro (getattr/setattr with string object arg) * Replaced "dictobject" with more powerful "mappingobject" * New per-type functio tp_hash to implement arbitrary object hashing, and hashobject() to interface to it * Added built-in functions hash(v) and hasattr(v, 'name') * classobject: made some functions static that accidentally weren't; added __hash__ special instance method to implement hash() * Added proper comparison for built-in methods and functions
* * Added Fixcprt.py: script to fix copyright message.Guido van Rossum1993-01-261-7/+2
| | | | | | | | | | | * various modules: added 1993 to copyright. * thread.c: added copyright notice. * ceval.c: minor change to error message for "+" * stdwinmodule.c: check for error from wfetchcolor * config.c: MS-DOS fixes (define PYTHONPATH, use DELIM, use osdefs.h) * Add declaration of inittab to import.h * sysmodule.c: added sys.builtin_module_names * xxmodule.c, xxobject.c: fix minor errors
* * Makefile: cosmeticsGuido van Rossum1992-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * socketmodule.c: get rid of makepair(); fix makesocketaddr to fix broken recvfrom() * socketmodule: get rid of getStrarg() * ceval.h: move eval_code() to new file eval.h, so compile.h is no longer needed. * ceval.c: move thread comments to ceval.h; always make save/restore thread functions available (for dynloaded modules) * cdmodule.c, listobject.c: don't include compile.h * flmodule.c: include ceval.h * import.c: include eval.h instead of ceval.h * cgen.py: add forground(); noport(); winopen(""); to initgl(). * bltinmodule.c, socketmodule.c, fileobject.c, posixmodule.c, selectmodule.c: adapt to threads (add BGN/END SAVE macros) * stdwinmodule.c: adapt to threads and use a special stdwin lock. * pythonmain.c: don't include getpythonpath(). * pythonrun.c: use BGN/END SAVE instead of direct calls; also more BGN/END SAVE calls etc. * thread.c: bigger stack size for sun; change exit() to _exit() * threadmodule.c: use BGN/END SAVE macros where possible * timemodule.c: adapt better to threads; use BGN/END SAVE; add longsleep internal function if BSD_TIME; cosmetics
* Copyright for 1992 addedGuido van Rossum1992-04-051-1/+1
|
* Print messages about where from modules are imported when -v is given.Guido van Rossum1992-03-271-2/+27
|
* Move SEP to osdefs.h. Use MAXPATHLEN from osdefs.h.Guido van Rossum1992-02-261-15/+2
|
* getbinaryname is now part of dl_loadmod.Guido van Rossum1992-01-261-63/+2
|
* Support for dynamic loading added.Guido van Rossum1992-01-191-5/+132
|
* Use IOError and ImportError when import fails.Guido van Rossum1991-12-241-4/+8
|
* Change RuntimeError into IOError when module file not found on reload.Guido van Rossum1991-12-161-1/+1
|
* New magic word; and check it.Guido van Rossum1991-12-161-3/+8
|
* Use more dict2 functions./Guido van Rossum1991-08-161-4/+6
|