Re: [Bacula-users] python module

2006-07-04 Thread Kern Sibbald
On Tuesday 04 July 2006 11:27, le dahut wrote: > For me it seems to be a barbarian method. I don't like text parsing > because of the errors than can happen due to internationalization, like > 'ifconfig' which needs 2 different parsers if it's in French or in English. > However you can take my exam

Re: [Bacula-users] python module

2006-07-04 Thread le dahut
For me it seems to be a barbarian method. I don't like text parsing because of the errors than can happen due to internationalization, like 'ifconfig' which needs 2 different parsers if it's in French or in English. However you can take my example (which works) if you want, my messages to mailin

Re: [Bacula-users] python module

2006-07-04 Thread Kern Sibbald
On Tuesday 04 July 2006 09:22, le dahut wrote: > Yes, I used already something like : > """ > import commands > > estim = commands.getoutput('/bin/echo -e "estimate > level=%s\n1"|/usr/sbin/bconsole -c > /etc/bacula/bconsole.conf'%niveau).split('bytes=') > """ > > ;-) If it can help someone else ..

Re: [Bacula-users] python module

2006-07-04 Thread le dahut
Yes, I used already something like : """ import commands estim = commands.getoutput('/bin/echo -e "estimate level=%s\n1"|/usr/sbin/bconsole -c /etc/bacula/bconsole.conf'%niveau).split('bytes=') """ ;-) If it can help someone else ... K. Kern Sibbald a écrit : > On Monday 03 July 2006 17:09

Re: [Bacula-users] python module

2006-07-03 Thread Kern Sibbald
On Monday 03 July 2006 17:09, le dahut wrote: > Ok, everything works fine now. > > Another question, is it possible to get an estimation via python Scripting If you mean can the Python script run a console "estimate" command, the answer is: no, not directly as the only "command" that Python can r

Re: [Bacula-users] python module

2006-07-03 Thread le dahut
Ok, everything works fine now. Another question, is it possible to get an estimation via python Scripting ? K. Kern Sibbald a écrit : > On Monday 03 July 2006 13:24, le dahut wrote: >> Hello, >> >> Bacula 1.38.10 RPM compiled successfully with the option --with-python. >> >> But in a python p

Re: [Bacula-users] python module

2006-07-03 Thread Kern Sibbald
On Monday 03 July 2006 13:24, le dahut wrote: > Hello, > > Bacula 1.38.10 RPM compiled successfully with the option --with-python. > > But in a python prompt I get this : > >>> import sys, bacula > > Traceback (most recent call last): >File "", line 1, in ? > ImportError: No module named bacul

[Bacula-users] python module

2006-07-03 Thread le dahut
Hello, Bacula 1.38.10 RPM compiled successfully with the option --with-python. But in a python prompt I get this : >>> import sys, bacula Traceback (most recent call last): File "", line 1, in ? ImportError: No module named bacula >>> Any idea ? K. Using Tomcat but need to do more? Nee