euglug.org

[작성자:] admin

  • [Eug-lug] Lan Party?



    Matthew JarvisFri Jul 7 08:46:30 PDT 2006

    KI7AY wrote:
    > Hey folks.
    > 
    >    My son Corey (not yet a Linux geek) is getting bored and wants to 
    > have a Lan Party some weekend. Is there a publicly available building 
    > with internet access available somewhere that could be used for such a 
    > thing?
    > 
    > Thanks, Jim Darrough
    
    I don't know if they are still around but there was some sort of 
    internet cafe thing going in the building with Cosmic Pizza - somewhere 
    like 8th/Charnelton
    
    
    Matthew S. Jarvis
    IT Manager
    Bike Friday - "Performance that Packs."
    www.bikefriday.com
    541/687-0487 x140
    mattj at bikefriday.com
    
    
  • [Eug-lug] Lan Party?



    KI7AYFri Jul 7 08:11:25 PDT 2006

    Hey folks.
    
        My son Corey (not yet a Linux geek) is getting bored and wants to 
    have a Lan Party some weekend. Is there a publicly available building 
    with internet access available somewhere that could be used for such a 
    thing?
    
    Thanks, Jim Darrough
    
  • [Python] Finding an error name



    Martin KellyThu Jul 6 22:09:03 PDT 2006

    Okay... I haven't found a bug in python yet, but I guess I just found 
    one. shelve works otherwise though... I've used it to save 10 or so 
    variables, and it works correctly every time.
    
    I thought anydbm.error was the error, but I could never catch it... I 
    see now that the reason was that I hadn't imported anydbm. I just tried 
    and that works though, so thanks.
    
    I suppose I should submit a bug report now.
    
    Martin
    
    Bob Miller wrote:
    > Martin Kelly wrote:
    > 
    >> I'm trying to figure out what error type is given by shelve.open(file, 
    >> "r") when the file does not exist.
    > 
    > The exception type is an anydbm.error.  But I don't understand the
    > source code.
    > 
    >>From anydbm.py:
    > 
    >     # ...
    >     class error(Exception):
    >         pass
    >     # ...
    >     error = tuple(_errors)
    >     # ... line 77:
    >         raise error, "need 'c' or 'n'..."
    > 
    > The Python Reference Manual doesn't say anything about using a tuple
    > in a raise statement.
    > 
    >     http://docs.python.org/ref/raise.html
    > 
    > But that's what it is.  Here's a sample shell session.
    > 
    >     Python 2.4.3 (#1, Jun 28 2006, 06:34:30) 
    >     [GCC 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2
    >     Type "help", "copyright", "credits" or "license" for more information.
    >     >>> import shelve
    >     >>> import anydbm
    >     >>> try:
    >     ...     shelve.open('nonexistent', 'r')
    >     ... except anydbm.error:
    >     ...     print 'caught it'
    >     ... 
    >     caught it
    >     Exception exceptions.AttributeError: "DbfilenameShelf instance has no
    >     attribute 'writeback'" in  ignored
    >     >>> anydbm.error
    >     (<class anydbm.error at 0xb7f48bfc>,
    >      <class bsddb._db.DBError at 0xb7f5623c>,
    >      <class gdbm.error at 0xb7f48cbc>,
    >      <class dbm.error at 0xb7f5b38c>,
    >      <class exceptions.IOError at 0xb7f774ac>)
    >     >>> 
    > 
    > So, uh, what's that weird other bit, exceptions.AttributeError?
    > That's a bug in Python 2.4.3.  You can see in shelve.py that
    > Shelf.__del__() calls Shelf.close() calls Shelf.sync() which
    > references self.writeback even though that attribute doesn't exist.
    > It also references self.dict which also doesn't exist.
    > 
    > My opinion is that if shelve is that poorly debugged, it's probably
    > not ready for prime time.
    > 
    > Or you could submit a bug report...
    > 
    
  • [Python] Finding an error name



    Bob MillerThu Jul 6 21:56:35 PDT 2006

    Martin Kelly wrote:
    
    > I'm trying to figure out what error type is given by shelve.open(file, 
    > "r") when the file does not exist.
    
    The exception type is an anydbm.error.  But I don't understand the
    source code.
    
    >From anydbm.py:
    
        # ...
        class error(Exception):
            pass
        # ...
        error = tuple(_errors)
        # ... line 77:
            raise error, "need 'c' or 'n'..."
    
    The Python Reference Manual doesn't say anything about using a tuple
    in a raise statement.
    
        http://docs.python.org/ref/raise.html
    
    But that's what it is.  Here's a sample shell session.
    
        Python 2.4.3 (#1, Jun 28 2006, 06:34:30) 
        [GCC 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2
        Type "help", "copyright", "credits" or "license" for more information.
        >>> import shelve
        >>> import anydbm
        >>> try:
        ...     shelve.open('nonexistent', 'r')
        ... except anydbm.error:
        ...     print 'caught it'
        ... 
        caught it
        Exception exceptions.AttributeError: "DbfilenameShelf instance has no
        attribute 'writeback'" in  ignored
        >>> anydbm.error
        (<class anydbm.error at 0xb7f48bfc>,
         <class bsddb._db.DBError at 0xb7f5623c>,
         <class gdbm.error at 0xb7f48cbc>,
         <class dbm.error at 0xb7f5b38c>,
         <class exceptions.IOError at 0xb7f774ac>)
        >>> 
    
    So, uh, what's that weird other bit, exceptions.AttributeError?
    That's a bug in Python 2.4.3.  You can see in shelve.py that
    Shelf.__del__() calls Shelf.close() calls Shelf.sync() which
    references self.writeback even though that attribute doesn't exist.
    It also references self.dict which also doesn't exist.
    
    My opinion is that if shelve is that poorly debugged, it's probably
    not ready for prime time.
    
    Or you could submit a bug report...
    
    -- 
    Bob Miller                              K<bob>
                                            kbob at jogger-egg.com
    
  • [Eug-lug] shell evilness



    tomanThu Jul 6 20:29:19 PDT 2006

    >> On 7/6/06, Patrick R. Wade <prwade at oip.net> wrote:
    >>     
    >>> larry price wrote:
    >>>       
    >>>> mkdir $(for d in 1 2 3 4 5 6; do eval "date -v+${d}d +%A";done)
    >>>>
    >>>> challenge to the perl monks; do the same thing in fewer 
    >>>>         
    >> characters...
    >>     
    Um,
    mkdir {Sun,Satur,Mon,Thurs,Tues,Wednes,Fri}day
    
    Sometimes simpler is better, or at least shorter.
    Though you can't really fault other languages for being longer,
    the shell does have the home court advantage. 
    
                                                                          J. 
    Toman
    
    
  • [Python] Finding an error name



    Martin KellyThu Jul 6 19:10:01 PDT 2006

    I'm trying to figure out what error type is given by shelve.open(file, 
    "r") when the file does not exist. I've tried everything that looks 
    likely, but none of them seem to work. (This is for use in a try: 
    except: statement). So for now it's working fine with an except:, but 
    that's not optimal... it will catch all errors and it would be better to 
    be more specific.
    
    This code snippet:
    
    import shelve
    from traceback import format_exc
    
    try:
        db = shelve.open("meh", "r")
    except:
        print format_exc()
    
    Gave me this output:
    Traceback (most recent call last):
       File "test.py", line 5, in ?
         db = shelve.open("meh", "r")
       File "/usr/lib/python2.4/shelve.py", line 231, in open
         return DbfilenameShelf(filename, flag, protocol, writeback, binary)
       File "/usr/lib/python2.4/shelve.py", line 212, in __init__
         Shelf.__init__(self, anydbm.open(filename, flag), protocol,
    writeback, binary)
       File "/usr/lib/python2.4/anydbm.py", line 77, in open
         raise error, "need 'c' or 'n' flag to open new db"
    error: need 'c' or 'n' flag to open new db
    
    Exception exceptions.AttributeError: "DbfilenameShelf instance has no
    attribute 'writeback'" in  ignored
    
    Does anyone know what the error might be?
    
    Thanks,
    Martin
    
  • [Eug-lug] shell evilness



    Patrick R. WadeThu Jul 6 16:49:24 PDT 2006

    larry price wrote:
    > 
    > We've wandered off into low-key OS advocacy for the original free unix
    > and arcana about implementations of obscure utilities.
    
    Wandered?  Isn't that the core mission of the list? :-)
    
    -- 
    On two occasions I have been asked [by members of Parliament!], 'Pray,
    Mr. Babbage, if you put into the machine wrong figures, will the right
    answers come out?' I am not able rightly to apprehend the kind of
    confusion of ideas that could provoke such a question.
    	-- Charles Babbage
    
  • [Eug-lug] shell evilness



    larry priceThu Jul 6 14:53:33 PDT 2006

    On 7/6/06, Jason LaPier <jlapier at uoregon.edu> wrote:
    
    > ruby -e 'require "date";Date::DAYNAMES.each{|d|Dir.mkdir d}'
    
    That's definitely a contender.
    
  • [Eug-lug] shell evilness



    Jason LaPierThu Jul 6 14:50:00 PDT 2006

    > -----Original Message-----
    > From: euglug-bounces at euglug.org 
    > [mailto:euglug-bounces at euglug.org] On Behalf Of larry price
    > Sent: Thursday, July 06, 2006 11:20 AM
    > To: Eugene Unix and Gnu/Linux User Group
    > Subject: Re: [Eug-lug] shell evilness
    > 
    > well now,
    > 
    > larry at bluejay:~/week$ rm -r *;for d in 1 2 3 4 5 6 7; do mkdir `date
    > -v+${d}d +%A`; done
    > larry at bluejay:~/week$ ls
    > Friday          Monday          Saturday        Sunday
    > Thursday        Tuesday         Wednesday
    > 
    
    Oh, I know the original challenge was to perl, and this ain't exactly less
    chars, but I've been doing too much ruby lately:
    
    ruby -e 'require "date";Date::DAYNAMES.each{|d|Dir.mkdir d}'
    
    
    - Jason
    
    
    
    > 
    > works on systems from Freebsd 4.11 to 6.1
    > 
    > the disappearance of the -v option from other forms of date 
    > seems counterproductive.
    > 
    > 
    > 
    > On 7/6/06, Patrick R. Wade <prwade at oip.net> wrote:
    > > larry price wrote:
    > > > mkdir $(for d in 1 2 3 4 5 6; do eval "date -v+${d}d +%A";done)
    > > >
    > > > challenge to the perl monks; do the same thing in fewer 
    > characters...
    > >
    > > prwade at lusitania:~$ uname -a
    > > Linux lusitania 2.6.15-23-server #1 SMP Tue May 23 15:10:35 UTC 2006
    > > i686 GNU/Linux
    > > prwade at lusitania:~$ ( export d=1 ; date -v+${d}d +%A )
    > > date: invalid option -- v
    > > Try `date --help' for more information.
    > > prwade at lusitania:~$
    > >
    > >
    > > --
    > > On two occasions I have been asked [by members of 
    > Parliament!], 'Pray, 
    > > Mr. Babbage, if you put into the machine wrong figures, 
    > will the right 
    > > answers come out?' I am not able rightly to apprehend the kind of 
    > > confusion of ideas that could provoke such a question.
    > >         -- Charles Babbage
    > > _______________________________________________
    > > EUGLUG mailing list
    > > euglug at euglug.org
    > > http://www.euglug.org/mailman/listinfo/euglug
    > >
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    > 
    
    Jason LaPier
    Network Manager
    TACS / WRRC / NPSO
    University of Oregon
    
    
  • [Eug-lug] shell evilness



    larry priceThu Jul 6 14:49:49 PDT 2006

    The original purpose (long since accomplished)
    was to create a directory containing directories named after each day
    of the week.
    
    We've wandered off into low-key OS advocacy for the original free unix
    and arcana about implementations of obscure utilities.
    
    On 7/6/06, Jason LaPier <jlapier at uoregon.edu> wrote:
    >
    >
    > > -----Original Message-----
    > > From: euglug-bounces at euglug.org
    > > [mailto:euglug-bounces at euglug.org] On Behalf Of larry price
    > > Sent: Thursday, July 06, 2006 11:20 AM
    > > To: Eugene Unix and Gnu/Linux User Group
    > > Subject: Re: [Eug-lug] shell evilness
    > >
    > > well now,
    > >
    > > larry at bluejay:~/week$ rm -r *;for d in 1 2 3 4 5 6 7; do mkdir `date
    > > -v+${d}d +%A`; done
    > > larry at bluejay:~/week$ ls
    > > Friday          Monday          Saturday        Sunday
    > > Thursday        Tuesday         Wednesday
    > >
    > >
    > > works on systems from Freebsd 4.11 to 6.1
    > >
    > > the disappearance of the -v option from other forms of date
    > > seems counterproductive.
    >
    >
    > If I understand correctly what you're trying to do:
    >
    > $ date
    > Thu Jul  6 14:17:48 PDT 2006
    >
    > $ date -d "today + 1 day"
    > Fri Jul  7 14:17:56 PDT 2006
    >
    > $ date +%A
    > Thursday
    >
    > $ date -d "today + 1 day" +%A
    > Friday
    >
    > That help?
    >
    > - Jason
    >
    >
    > >
    > >
    > >
    > > On 7/6/06, Patrick R. Wade <prwade at oip.net> wrote:
    > > > larry price wrote:
    > > > > mkdir $(for d in 1 2 3 4 5 6; do eval "date -v+${d}d +%A";done)
    > > > >
    > > > > challenge to the perl monks; do the same thing in fewer
    > > characters...
    > > >
    > > > prwade at lusitania:~$ uname -a
    > > > Linux lusitania 2.6.15-23-server #1 SMP Tue May 23 15:10:35 UTC 2006
    > > > i686 GNU/Linux
    > > > prwade at lusitania:~$ ( export d=1 ; date -v+${d}d +%A )
    > > > date: invalid option -- v
    > > > Try `date --help' for more information.
    > > > prwade at lusitania:~$
    > > >
    > > >
    > > > --
    > > > On two occasions I have been asked [by members of
    > > Parliament!], 'Pray,
    > > > Mr. Babbage, if you put into the machine wrong figures,
    > > will the right
    > > > answers come out?' I am not able rightly to apprehend the kind of
    > > > confusion of ideas that could provoke such a question.
    > > >         -- Charles Babbage
    > > > _______________________________________________
    > > > EUGLUG mailing list
    > > > euglug at euglug.org
    > > > http://www.euglug.org/mailman/listinfo/euglug
    > > >
    > > _______________________________________________
    > > EUGLUG mailing list
    > > euglug at euglug.org
    > > http://www.euglug.org/mailman/listinfo/euglug
    > >
    >
    >
    >
    > Jason LaPier
    > Network Manager
    > TACS / WRRC / NPSO
    > University of Oregon
    >
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    >