syntactic sugar for filesystem access in Python

Kragen Sitaker kragen at dnaco.net
Thu Sep 28 13:35:36 EDT 2000


In article <st5mdog2m9gt18 at corp.supernews.com>,
Jason Cunliffe <jasonic at nomadicsltd.com> wrote:
>Erwin S. Andreasen <erwin at andreasen.com> wrote in message
>news:slrn8t4r5b.qc.erwin at erwin.andreasen.org...
>> How about extending it to include the Internet? ;)
>>
>> # First initialize the Internet ;)
>> internet = Internet()

Better be careful you don't 'del internet' --- a lot of people will be
upset ;)

>> sock = internet.org.python.www['http']
>>
>> (although the bare sockets are probably not much fun, it might be slightly
>> interesting if each "Address" object had method for higher-level access to
>> protocols, e.g. something a la urllib.urlget(self.address).read()).
>
>Filesystem is cool and this is fabulous suggestion.
>- What would it take to get it working?
>- And where does this fit in with XML-RPC, SOAP and .NET ?

I agree that it's a great suggestion.  What would it take to get it
working?  Somebody figuring out a decent way to map URLs into Python
namespace, and then implementing it --- probably not terribly tough,
although perhaps more than my one page of code for the filesystem.  How
would it fit in with XML-RPC, SOAP, and .NET?  Your URL objects would
implement __call__ :)
-- 
<kragen at pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
Perilous to all of us are the devices of an art deeper than we ourselves
possess.
                -- Gandalf the Grey [J.R.R. Tolkien, "Lord of the Rings"]





More information about the Python-list mailing list