I'm not sure I follow. What kind of problems are you thinking of for non-interactive programs?
For the things that I'm working with, the code will run as daemon processes and will start with something like: import ow ow.error_level(ow.error_level.connect) ow.error_print(ow.error_print.syslog) ow.init('u') to be able to send connect level messages to syslog, actually daemon.log. This allows me to have a log of messages for what was going on with the process from the owlib point of view. - Peter On 8/3/05, Alfille, Paul H.,M.D. <[EMAIL PROTECTED]> wrote: > Very nice, but might this create problems in non-interactive programs? > > All the error messages are set in a common set of routines so we could alter > the > handling if it would help -- i.e. set a global variable with the error string. > > Paul > > > -----Original Message----- > From: [EMAIL PROTECTED] on behalf of Peter Kropf > Sent: Tue 8/2/2005 10:25 PM > To: owfs-developers@lists.sourceforge.net > Subject: [Owfs-developers] Accessing error_level and error_print from Python / > Perl / PHP / TCL > > I've modified modules/swig/ow.i to provide access to the error_level > and error_print global variables. This was done so that direct access > to owlib from the language bindings will be able to set the variables > as appropiate. > > In the Python world, it can now be used as: > > [EMAIL PROTECTED]:/space/src/owfs/module/swig> python > Python 2.4.1 (#2, Mar 30 2005, 21:51:10) > [GCC 3.3.5 (Debian 1:3.3.5-8ubuntu2)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import ow > >>> ow.error_level(ow.error_level.connect) > 2 > >>> ow.init('u') > ERR: Failed to set configuration on USB DS9490 adapter at 002/004. > : Operation not permitted > >>> > > This sample set the error_level to connect (2) and then tried to open > a USB adapter. Since the current permissions on the USB device is > restricted, this failed. Without setting the error_level, no message > would have been displayed. There's also an example under > modules/swig/python/examples/errormessages.py. > > I haven't done anything specific to the Perl, PHP or TCL bindings. If > there's something that can be done to help the users, I'm hoping that > the binding author or someone more knowledgable than me will make the > needed changes. > > And, if anyone else is using the Python bindings, I would appreciate > it if you could try this out and make sure that it works. > > - Peter > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick > _______________________________________________ > Owfs-developers mailing list > Owfs-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/owfs-developers > > > ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers