How to use module audit-lib ?

2007-10-19 Thread Sébastien Weber
Hello,

I've installed the python-audit-lib module but there's no documentation.
Does someone know how to use it ?

Thank's in advance,

SW
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to use module audit-lib ?

2007-10-19 Thread Sébastien Weber
Le Fri, 19 Oct 2007 21:49:59 +0200, Jarek Zgoda a écrit :

 Sébastien Weber napisał(a):
 
 I've installed the python-audit-lib module but there's no
 documentation. Does someone know how to use it ?
 
 I don't know this package, but why did you install it? Maybe somebody in
 Überwald knows its usage?

Hello,
I've installed it to monitor some file's use : who/what makes what on a 
file ? It's a wrapper for the audit fonction which is new in the kernel 
2.6 and which allows you to know how a file is used by who. A command-
line utility named auditctl exists, but I want something written in 
Python - to make an simple end-user application.
It seems like nobody has ever written smoething with that module... 

(Sorry for my english, I'm french).

SW
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: write whitespace/tab to a text file

2007-10-19 Thread Sébastien Weber
Le Fri, 19 Oct 2007 07:33:29 -0700, dirkheld a écrit :

 Hi,
 
 I would l like to write some data to a text file. I want to write the
 data with whitespace or tabs in between so that I create tabular columns
 like in a spreadsheet. How can I do this in python. (btw, I'm new to
 python)
 
 names = ['John','Steve','asimov','fred','jim'] ## output I would like in
 txt file : John Steve asimov  fred jim
 
 f=open('/User/home/Documents/programming/python/test.txt','w')
   for x in range(len(names)):
   f.write(tags[x])
   f.close()
Maybe :

names = [Sebastien, Ana, Elodie, Mohamed, Antoniavna]
maxlen = max(len(n) for n in names)
linetowrite = 
for n in names:
linetowrite += n.ljust(maxlen + 3, ' ')
f = open('test.txt', 'w')
f.writelines(linetowrite.strip(' ') + '\n')
f.close()
-- 
http://mail.python.org/mailman/listinfo/python-list

Pyinotify : which user ?

2007-10-18 Thread Sébastien Weber
Hello,

I'm actually writing an application with pyinotify which watchs a 
directory.
Pyinotify lets me know the events (access, modify, suppression, etc.) on 
and in the directory, but not the users who are responsable of them.
Does someone know a library which could give me that information (who's 
using a file) ?

Thank's in advance,

SW.
-- 
http://mail.python.org/mailman/listinfo/python-list