[Tutor] A hypothetical module system for Useless Python?

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Thu Oct 31 15:23:15 2002


Hi everyone,


I've been thinking of writing something to make it easier to submit and
grab programs from Useless Python.  Let me paint out a hypothetical
utility: I'd like suggestions if this is a good idea or not?  Make believe
can be pretty powerful... *grin*


Let's pretend that we've written some neat program that we'd like to share
with others on Useless.  Let's call this program "hello.py".  Then we
could imagine some sort of utility called 'useless' that would let us
submit this program to Useless Python:



######
$ useless submit hello.py

Hello <dyoo@hkn.eecs.berkeley.edu>; I will submit

    hello.py

to Useless Python.

Do you want to attach a version number to this program?  If not, I'll just
attach a new version number to the program.

[1.0] >>> 1.0

Please give a one-liner description of your program below:

>>> This is your standard hello world program.

Here's a quick summary of what I'm about to submit to Useless:

******
Program: hello.py
Version: 1.0
Submitter: Danny Yoo <dyoo@hkn.eecs.berkeley.edu>
Description: This is your standard hello world program.
******

Does this look ok?

[y/n?] >>> y

Sending...

Ok, I've sent your file to Useless Python.  You can check the status of
your submission online at http://uselesspython.org.  You can check the
status of your program by visiting your page on Useless, or query for it
with the command:

    useless info limbo/dyoo@hkn.eecs.berkeley.edu/hello.py

Bye!




$ useless info dyoo@hkn.eecs.berkeley.edu
Real name: Danny Yoo

Programs written:
    limbo/dyoo@hkn.eecs.berkeley.edu/hello.py [1.0]
    This is your standard hello world program.

Bye!




$ useless info hello.py
There are 3 programs with the name 'hello.py'.
    limbo/dyoo@hkn.eecs.berkeley.edu/hello.py/1.0
        This is your standard hello world program.

    simple/rob@uselesspython.com/hello.py/1.0
        This is another hello world program.

    simple/rob@uselesspython.com/hello.py/2.0
        This is another hello world program, with a different version
        number.

Bye!



$ useless info limbo

There is 1 program in the 'limbo' category.
    limbo/dyoo@hkn.eecs.berkeley.edu/hello.py/1.0
        This is your standard hello world program.

Bye!




$ useless get limbo/dyoo@hkn.eecs.berkeley.edu/hello.py
Automatically choosing the highest version of hello.py [1.0].

I am about to download:

    limbo/dyoo@hkn.eecs.berkeley.edu/hello.py/1.0
        This is your standard hello world program.

Downloading 'hello.py' into current directory... done!

Bye!
######



This is something that's been floating in my head for a while.  I want to
know if this is something that might be useful for Useless.  *grin*