Re: pyrudp

2013-01-30 Thread wrw
On Jan 30, 2013, at 7:14 PM, Chris Angelico wrote: > On Thu, Jan 31, 2013 at 11:04 AM, Jorge Alberto Diaz Orozco > wrote: >> I have restrictions in my system that does not allow me to use TCP, so I >> want to make a pipe over UDP imitating TCP behavior. >> I have control over both endpoints, an

Re: Noob: Trying to run two python scrips on a pfsense/freeBSD for the OWL-Intuition-LC

2013-01-01 Thread wrw
On Jan 1, 2013, at 9:42 PM, vbho...@gmail.com wrote: > Hi, > > I wrote couple of scrips to work with OWL-intution-LC home/office electricity > monitor. The concept of the first scrip (owl.py) to capture network multicast > from the OWL gateway and write to a .csv file has been taken from a > r

Re: problem with usbtmc-communication

2012-12-11 Thread wrw
On Dec 11, 2012, at 3:48 PM, Jean Dubois wrote: [byte] >> >> OK - I see where the examples came from, and I notice - >> >> int my_inst; >> my_inst=open(ā€œ/dev/usbtmc1ā€,O_RDWR); >> write(my_inst,ā€*RST\nā€,5); >> close(my_inst); >> >> and similarly in another place

Re: problem with usbtmc-communication

2012-12-11 Thread wrw
On Dec 11, 2012, at 1:58 AM, Jean Dubois wrote: > On 10 dec, 16:34, w...@mac.com wrote: >> On Dec 10, 2012, at 8:31 AM, Jean Dubois wrote: >> >> [byte] >>> As you can see this approach suffers from the same "buffer problem" as >>> the approach with readline did. One now good argue as a workaro

Re: problem with usbtmc-communication

2012-12-10 Thread wrw
On Dec 10, 2012, at 8:31 AM, Jean Dubois wrote: [byte] > As you can see this approach suffers from the same "buffer problem" as > the approach with readline did. One now good argue as a workaround: > get rid of the first data pair and add an extra measure command for > the missing data pair, how

Re: How to list a file which already created a 2 mins ago

2012-12-06 Thread wrw
On Dec 6, 2012, at 4:29 PM, Irmen de Jong wrote: > On 6-12-2012 17:49, moonhkt wrote: >> Hi All >> >> AIX.5.3 >> Python 2.6.2 >> >> File ftp to Machine A, need to rename then send to Machine B. >> >> How to list a file which already created a 2 mins ago ? If file aging >> more than 2 mins. I

Re: problem with usbtmc-communication

2012-12-06 Thread wrw
On Dec 6, 2012, at 2:41 PM, Jean Dubois wrote: > On 6 dec, 15:50, w...@mac.com wrote: >> On Dec 6, 2012, at 8:50 AM, Jean Dubois wrote: >> >> [byte] >> >> >>> It seems there is some misunderstanding here. What I meant with how >>> to "do the equivalent in Python" refered to "reading charac

Re: problem with usbtmc-communication

2012-12-06 Thread wrw
On Dec 6, 2012, at 8:50 AM, Jean Dubois wrote: [byte] > > It seems there is some misunderstanding here. What I meant with how > to "do the equivalent in Python" refered to "reading characters > rather than lines". > I have written working code myself for another Keithleu which does use > RS23

Re: problem with usbtmc-communication

2012-12-05 Thread wrw
On Dec 5, 2012, at 3:38 PM, Jean Dubois wrote: [byte] >> >> I note that in your Octave example you are reading characters rather than >> lines. It seems to me that you have two choices here, either do the >> equivalent in python or dig through the Keithley documentation to find the >> hex

Re: problem with usbtmc-communication

2012-12-05 Thread wrw
On Dec 4, 2012, at 11:12 AM, Jean Dubois wrote: > On 4 dec, 15:33, w...@mac.com wrote: >> On Dec 4, 2012, at 7:14 AM, Jean Dubois wrote: >> >> >> >>> The following test program which tries to communicate with a Keithley >>> 2200 programmable power supply using usbtmc in Python does not work a

Re: [newbie] problem with usbtmc-communication

2012-12-04 Thread wrw
On Dec 4, 2012, at 7:14 AM, Jean Dubois wrote: > The following test program which tries to communicate with a Keithley > 2200 programmable power supply using usbtmc in Python does not work as > expected. I have connected a 10 ohm resistor to its terminals and I > apply 0.025A, 0.050A, 0.075A en 0

Re: Puzzling error msg.

2012-12-03 Thread wrw
On Dec 3, 2012, at 1:27 PM, Ian Kelly wrote: > On Mon, Dec 3, 2012 at 10:37 AM, wrote: > if found_0 == True or found_1 == True: > > Not related to your problem, but this line would be more pythonic as: > > if found_0 or found_1: > Thanks Ian - yes, Steven pointed out the same th

Re: Puzzling error msg.

2012-12-03 Thread wrw
On Dec 3, 2012, at 1:12 PM, Steven D'Aprano wrote: > On Mon, 03 Dec 2012 12:37:42 -0500, wrw wrote: > >> So far in my experience with Python, it's error messages have been >> clear, concise, and quite good at fingering my errors. However, the >> message bel

Puzzling error msg.

2012-12-03 Thread wrw
ecent call last): File "./Connection_Monitor.py", line 146, in Google_up, Google_summary, Google_RTT, Google_stddev = Google.connection_test() File "/Users/wrw/Dev/Python/Connection_Monitor/Version2.2/WorkingCopy/network.py", line 101, in connection_test # Inde

Re: Python Script for Colorizing Traceroute Output (apologies for top-post)

2012-11-17 Thread wrw
On Nov 17, 2012, at 10:04 AM, Jordan Bylsma wrote: > I'm looking into writing a python script that colorizes particular hops when > using traceroute. Anyone run across something like this? I don't think it > would be extremely difficult to write but some example code would help. > > Basically

Re: Python Script for Colorizing Traceroute Output

2012-11-17 Thread wrw
Don't forget that most firewalls don't decrement) the time-to-live number, and unless you REALLY know what to look for, are invisible. -Bill On Nov 17, 2012, at 10:04 AM, Jordan Bylsma wrote: > I'm looking into writing a python script that colorizes particular hops when > using traceroute. An

Re: Subprocess puzzle and two questions

2012-11-14 Thread wrw
On Nov 14, 2012, at 9:22 AM, Roy Smith wrote: > In article , > William Ray Wing wrote: > >> On Nov 13, 2012, at 11:41 PM, Roy Smith wrote: >> >>> In article , >>> w...@mac.com wrote: >>> I need to time the operation of a command-line utility (specifically nslookup) from within a p

Subprocess puzzle and two questions

2012-11-13 Thread wrw
I need to time the operation of a command-line utility (specifically nslookup) from within a python program I'm writing. I don't want to use python's timeit function because I'd like to avoid python's subprocess creation overhead. That leads me to the standard UNIX time function. So for examp

Re: problem with module PyVisa

2012-11-09 Thread wrw
On Nov 9, 2012, at 3:43 PM, Jean Dubois wrote: > > The error may be obvious but finding this file and how to install it > is not unfortunately. > It seems I have to install it from the National Instruments site but > Debian Linux doesn't seem to be supported... > and I doubt whether just copying

Re: Multi-dimensional list initialization

2012-11-08 Thread wrw
On Nov 7, 2012, at 11:51 PM, Andrew Robinson wrote: > On 11/07/2012 04:00 PM, Steven D'Aprano wrote: >> Andrew, it appears that your posts are being eaten or rejected by my >> ISP's news server, because they aren't showing up for me. Possibly a side- >> effect of your dates being in the distant p

Re: Getting a TimedRotatingFileHandler not to put two dates in the same file?

2012-10-24 Thread wrw
On Oct 24, 2012, at 10:22 AM, David M Chess wrote: > >> This works great, splitting the log information across files by date, as > >> long as the process is actually up at midnight. > >> > >> But now the users have noticed that if the process isn't up at midnight, > >> they can end up with lin

Re: Exact integer-valued floats

2012-09-24 Thread wrw
On Sep 22, 2012, at 7:06 PM, Dave Angel wrote: > On 09/22/2012 05:05 PM, Tim Roberts wrote: >> Dennis Lee Bieber wrote: >>> On 22 Sep 2012 01:36:59 GMT, Steven D'Aprano wrote: For non IEEE 754 floating point systems, there is no telling how bad the implementation could be :( >>> L