Linux and Python scripts, help needed

Steve Holden sholden at holdenweb.com
Mon Feb 11 07:42:22 EST 2002


"Fernando Pérez" <fperez528 at yahoo.com> wrote in message
news:a46uun$gc7$2 at peabody.colorado.edu...
> Henrik Motakef wrote:
>
> > This might be slightly off-topic, but usually pressing both buttons at
> > once emulates pressing the middle one...
>
> As long as you have
>
>     Option "Emulate3Buttons"
>     Option "Emulate3Timeout" "50"
>
> in your "InputDevice" section of /etc/X11/XF86Config-4
>
See how easy Linux is, Ron? ;-)

Seriously, when faced with problems of the apparent complexity of the ones
you describe here, there are two alternatives:

1) Continously simplify until you get something that works (even if it's
just a one-line script), then make it more complex again. Either it stops
working as you make it more complex, and you eventually have a head-smacking
epiphany, or it doesn't, and you are left slightly bemused as to what you
were originally doing wrong, but at least you have a working system.

2) Resort to superstition. Which was why, I presumed, you started altering
file permissions on things that looked unconnected <0.9 wink>.

Because there are so many things to do on a Linux system, there are many
things you can do wrong. Resist the urge to make things more complex to get
them working, and remember the old motto:

    First, make it work

    Then, *if* it doesn't run fast enough [or at 4.30 am <wink>],
    make it run faster [or at 4.30 am].

One last comment: many people would have edited their crontab to make the
job run at a different time instead of getting up at 4.30 to see what
happened. Although you don't say so, I presumed you chose the latter option
because you didn't want to disrupt your daily sequence. It's a useful
practice to write software so that you can run it in test mode in such a way
that normal production operations aren't disturbed by testing.

Often this will simply amount to running the tests in a different
directory -- back to the importance of environment again!

regards
 Steve
--
Consulting, training, speaking: http://www.holdenweb.com/
Author, Python Web Programming: http://pydish.holdenweb.com/pwp/

"This is Python.  We don't care much about theory, except where it
intersects with useful practice."  Aahz Maruch on c.l.py







More information about the Python-list mailing list