IWETHEY v. 0.3.0 | TODO
1,095 registered users | 1 active user | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Jumping into regular expressions in Python/CUPS maintenance
We've got a problem with our CUPS server, and the guy who might possibly be able to fix it is out for the near future. The problem itself is fixable by restarting the queue, but this requires noticing the queue is not working, then restarting it.

Now, there may be a simpler way to do this than what I'm thinking, and if there is, please kick me in the head and enlighten me.

In the page source for the list of printers, the HTML code which contains the link to the administrative page for each printer is:
<th bgcolor="#999966"\\><a href="*">{{PRINTERNAME}}</a></th>

where '*' is the location of the printer administration page. The way the page is generated, this code is on a line all by itself. The script will progressively retrieve the printer administration page for each printer on the main printer list, and if it detects the condition that requires queue restarting, will do so by triggering the link which does this, rechecking the page until the link appears for starting the queue, then does so.

I've never done regexp before, so I'd like to sanity check some stuff with all y'all before I go further. First off, on [link|http://www.amk.ca/python/howto/regex/|this] page, it mentions a single line versus multiline mode. Am I correct in assuming that if multiline isn't enabled, no regexp hit will be returned that flows over multiple lines? If I pass my regexp function the entire web page, will it parse it one line at a time?

Any suggestions for a good regexp tutorial site? For some reason, they are conceptually strange to me.
When somebody asks you to trade your security for freedom, it isn't your freedom they're talking about.
New Not remotely urgent any more.
Turns out the problem was caused by an excessively large log file; cron job has been added to delete the file on a regular basis. Filename is 'ldap.log', conclusions may be drawn from that. :P
When somebody asks you to trade your security for freedom, it isn't your freedom they're talking about.
     Jumping into regular expressions in Python/CUPS maintenance - (inthane-chan) - (1)
         Not remotely urgent any more. - (inthane-chan)

Not the sharpest knives in the drawer by far.
46 ms