Re: problem with gethostbyaddr with intranet addresses on MAC

2008-01-25 Thread Vladimir Rusinov
ogle.com') > >>> x > '64.233.167.99' > >>> gethostbyaddr(x) > ('py-in-f99.google.com', [], ['64.233.167.99']) > >>> e = '192.168.4.123' > >>> gethostbyaddr(e) > Traceback (most recent call last): > Fi

distutils: troubles with install

2007-12-28 Thread Vladimir Rusinov
""" from distutils.core import setup setup(name='logmanager', version='0.1.0', description='Log Management tool', author='Vladimir Rusinov', author_email='[EMAIL PROTECTED]', url='http://g

Re: Rounding

2007-12-18 Thread Vladimir Rusinov
On 12/18/07, Lars Johansen <[EMAIL PROTECTED]> wrote: > > that does not round up.. > Yep, this is truncation. I'd read the question better. -- Vladimir Rusinov GreenMice Solutions: IT-решения на базе Linux http://greenmice.info/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Rounding

2007-12-18 Thread Vladimir Rusinov
easy way to round down to the nearest whole number? init() ? -- Vladimir Rusinov GreenMice Solutions: IT-решения на базе Linux http://greenmice.info/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Deleting lines from a file

2007-12-17 Thread Vladimir Rusinov
On 12/17/07, Horacius ReX <[EMAIL PROTECTED]> wrote: > > and regardless of the speed, what do you think would be the best > method to do this ? > use sqlite -- Vladimir Rusinov GreenMice Solutions: IT-решения на базе Linux http://greenmice.info/ -- http://mail.python.or

Re: listdir() with mask

2007-12-14 Thread Vladimir Rusinov
On 12/14/07, Jeff McNeil <[EMAIL PROTECTED]> wrote: > > Sure is.. check out the glob module: > http://www.python.org/doc/current/lib/module-glob.html (Official) > http://blog.doughellmann.com/2007/07/pymotw-glob.html (PyMOTW) > Thanks a lot! -- Vladimir Rusinov GreenMice

listdir() with mask

2007-12-14 Thread Vladimir Rusinov
). Thanks and sorry for my English. -- Vladimir Rusinov GreenMice Solutions: IT-решения на базе Linux http://greenmice.info/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Monitoring the output of an external program

2007-12-13 Thread Vladimir Rusinov
ct you can even use single thread. -- Vladimir Rusinov GreenMice Solutions: IT-решения на базе Linux http://greenmice.info/ -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlite weirdness

2007-12-12 Thread Vladimir Rusinov
27;', > u'', u''), (u'01/04/2007', 281, 8.0, u'', u'', u'', u'', u'', u'', > u'', u'', u''), (u'01/05/2007', 281, 8.0, u'', u'', u'', u'', u'', > u'', u'', u'', u''), (u'01/08/2007', 281, 8.0, u'', u'', u'', u'', > u'', u'', u'', u'', u''), (u'01/09/2007', 281, 8.0, u'', u'', u'', > u'', u'', u'', u'', u'', u''), (u'01/10/2007', 281, 8.0, u'', u'', > u'', u'', u'', u'', u'', u'', u''), (u'01/11/2007', 281, 8.0, u'', > u'', u'', u'', u'', u'', u'', u'', u''), (u'01/12/2007', 281, 8.0, > u'', u'', u'', u'', u'', u'', u'', u'', u''), (u'01/15/2007', 281, > 8.0, u'', u'', u'', u'', u'', u'', u'', u'', u''), (u'01/16/2007', > 281, 8.0, u'', u'', u'', u'', u'', u'', u'', u'', u''), > (u'01/17/2007', 281, 8.0, u'', u'', u'', u'', u'', u'', u'', u'', > u''), (u'01/18/2007', 281, 8.0, u'', u'', u'', u'', u'', u'', u'', > u'', u''), (u'01/19/2007', 281, 8.0, u'', u'', u'', u'', u'', u'', > u'', u'', u''), (u'01/22/2007', 281, 8.0, u'', u'', u'', u'', u'', > u'', u'', u'', u''), (u'01/23/2007', 281, 8.0, u'', u'', u'', u'', > u'', u'', u'', u'', u''), (u'01/24/2007', 281, 8.0, u'', u'', u'', > u'', u'', u'', u'', u'', u''), (u'01/25/2007', 281, 8.0, u'', u'', > u'', u'', u'', u'', u'', u'', u''), (u'01/26/2007', 281, 8.0, u'', > u'', u'', u'', u'', u'', u'', u'', u'')] > [(80.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)] > Sorry, but this is unreadable. Try to execute your queries via sqlite shell. -- Vladimir Rusinov GreenMice Solutions: IT-решения на базе Linux http://greenmice.info/ -- http://mail.python.org/mailman/listinfo/python-list

Re: a strange SyntaxError

2007-12-10 Thread Vladimir Rusinov
> self.numlines = self.config['numlines'] > > self.w = 520 > self.h = 12*self.numfeeds*(self.numlines+1) why extra ident here? -- Vladimir Rusinov GreenMice Solutions: IT-решения на базе Linux http://greenmice.info/ -- http://mail.pytho

Re: Rss Feed Creator

2007-11-27 Thread Vladimir Rusinov
On 11/27/07, James Matthews <[EMAIL PROTECTED]> wrote: > > I am looking for a library that will create Rss/Atom feeds in python. It > needs to format the XML in a readable format! Does anyone have any > suggestions? You can also use some xml-based template engine (Kid or Gens

Re: python safe scripting

2007-11-22 Thread Vladimir Rusinov
On 11/21/07, Guilherme Polo <[EMAIL PROTECTED]> wrote: > > 2007/11/21, Vladimir Rusinov <[EMAIL PROTECTED]>: > > Hello! > > > > In one my project (it's logfile manager) I want to implement 'smart' > > configuration files, e.g. > > >

python safe scripting

2007-11-21 Thread Vladimir Rusinov
Hello! In one my project (it's logfile manager) I want to implement 'smart' configuration files, e.g. logfile("/var/log/messages") if (size() > 10*1024*1024) and (lavg() < 5): execute("my_log_alerter") rotate(save=10, compress='bzip2'

class='something' as kwarg

2007-11-17 Thread Vladimir Rusinov
Hello! I'm using beautiful soup html parser, and I need to get all '...' tags. It can be done by: import BeautifulSoup as BSoup ... soup = BSoup(page) for div in soup.findAll('div', class='g'): But how can I use `class` as kwarg name? -- Vladimir Rusi