[OT] organizing your scripts, with plenty of re-use
gagsl-py2 at yahoo.com.ar
Tue Oct 13 18:18:52 CEST 2009
En Tue, 13 Oct 2009 03:48:00 -0300, Dennis Lee Bieber
<wlfraed at ix.netcom.com> escribió:
> On Mon, 12 Oct 2009 16:36:58 -0700, Ethan Furman <ethan at stoneleaf.us>
> declaimed the following in gmane.comp.python.general:
>> coffe table, you look in your car, etc, etc, and so forth. If you move
>> a file in a package to somewhere else, and you don't tell the package
>> where it's at, it's not going to start looking all over the hard-drive
>> for it. If that were the case you would have to be extra careful to
>> have every module's name be distinct, and then what's the point of
>> having packages?
> Heh... Digging up some ancient history but... TRS-80 TRSDOS6 (and
> some earlier incarnations too) WOULD search all active drives if no
> drive letter was specified (no subdirectories, of course -- and I never
> had a hard drive on mine [$5000 for a 5MB drive?], just the two
> floppies). And for creating files, again if no drive were specified, it
> would create the file on the first drive that was not write-protected.
In the old MSDOS era, there was the APPEND command. It was used to set a
list of directories or subdirectories that were searched for data files
(in a way similar as PATH works for executable files). For example, after
you could edit a file like c:\foo\doc\readme.txt directly from the c:\foo
c:\foo> edit readme.txt
and because of "doc" being in the APPEND path, edit would find it. I think
Stef would enjoy using it - just listing each subdirectory would make the
disk tree completely flat as seen by the application.
I think this functionality was removed by the time Windows 95 came out
because it was very dangerous. It was extremely easy to open (or even
remove!) the wrong file.
More information about the Python-list