My more-interesting modules include "[:/Modules/Alias: Alias]", "[:/Modules/Edit: Edit]", and "[:/Modules/UT: UT]". I'll add others to this page as I have opportunity.
- Provides a mechanism whereby arbitrary callables are *effectively* converted to commands in interactive Python, but not in modules. To do this, Alias splits off the first word of the command line, attempts to evaluate it, and iff it is callable, the tail of the command is also evaluated and passed to the callable as an argument tuple. This allows the manual use of "dir", "reload", et al, as statements without requiring that parentheses be typed. Parentheses are still required in module source, however, and in any function calls in the tail of the command line.
- Provides a mechanism whereby arbitrary one-word names may be assigned to callable objects for use with the preceding mechanism. This allows one to dispense with the requirement to type fully-qualified long.nested.module.names for selected callables, and is where the module gets its name.
- Provides a mechanism for allowing modules to be imported through a bare reference to the module name.
- Provides a mechanism whereby modules imported by the preceding mechanism may auto-register aliases of their own choosing. Entering the name of a module that has already been imported does not re-import the module; rather it re-updates whatever auto-alias associations might exist in that module at the time the name is re-entered.
- Provides its own list of aliases, available via the preceding mechanism, for managing the alias dictionary.
- Does not function under IDLE without disabling the default sub-process. Probably does not function correctly, or even at all, without IDLE.
- Provides an Alias that attempts to open for editing the source for the module where the argument was defined, positioned, if possible, on the line where the definition starts.
- Provides a mechanism for recording the current size and position of the active IDLE window such that subsequent attempts to open the window open it with the remembered geometry.
- Provides an IDLE menu item to trigger the preceding mechanism.
- Functions only under IDLE. Does not function correctly without disabling the default sub-process.
- attachment:UT.py - last uploaded 2005-11-26.
- Provides several "utility" functions that I've found useful:
- A "smart" reload substitute that can automatically re-load other modules in dependancy-order, if the module being reloaded registers its dependancies, with convenience functions for declaring those dependancies.
- A convenience wrapper for cPickle that allows [un-]pickling single objects from/to a specified file with a single function call.
ThisLine, a function that returns the name and source line-number of the caller an arbitrary number of callers up the call-stack.
- Some old stuff, commented out.
- attachment:GWiz.py, a ""functional"" but incomplete GUI editor. More details later.
attachment:WinReg.py, a higher-level abstraction around _winreg. Fully functional and complete.
I hereby offer any modules that ""I"" attach to this page for inclusion in the official Python module library.